Closed PedroHGaspar closed 1 year ago
You should probably approach dots/commas in numbers via locale, not formatters: https://www.amcharts.com/docs/v4/concepts/locales/#Numbers
You should probably approach dots/commas in numbers via locale, not formatters: https://www.amcharts.com/docs/v4/concepts/locales/#Numbers
It worked! Thank you very much :D
Hey guys, i've tried all this tutorials from the DOCS but non of them seems to work properly in my code (probably i'm doing something wrong). I'm trying to change the dot for the comma in the tooltips, but nothing happens...
This is the DOCS I've searched: https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/ https://www.amcharts.com/docs/v4/reference/numberformatter/ https://www.amcharts.com/docs/v4/concepts/formatters/
This is my code:
function graficoAtribuicaoPerformance(dados) {
}
In this code i've wrote this: series.columns.template.tooltipText =
[bold]{category}[/]\nAbertura: {open.formatNumber('#.##')}\nFechamento: {close.formatNumber('#.##')} [/]\nValor: {value.formatNumber('#.##')}
;I've already tried to take off the format.number and leave just the {open}, {close} and {value}, but the dot stays. I've already tried to put a replace like this: series.columns.template.tooltipText =
[bold]{category}[/]\nAbertura: {open.formatNumber('#.##').replace('.', ',')}\nFechamento: {close.formatNumber('#.##').replace('.', ',')} [/]\nValor: {value.formatNumber('#.##').replace('.', ',')}
;i've also tried to put the localeToString but nothing happens either: series.columns.template.tooltipText =
[bold]{category}[/]\nAbertura: {open.formatNumber('#.##').toLocaleString('pt-BR')}\nFechamento: {close.formatNumber('#.##').toLocaleString('pt-BR')} [/]\nValor: {value.formatNumber('#.##').toLocaleString('pt-BR')}
;but nothing happens either, the dot stays on the tooltip. The first printscreen is the first code, and the second printscreen is the seconde code with the replace:
They still the same thing even with the replace.