Hello fellow programmers .. Im struggling adding a $ prefix to Amcharts Has anyone had any experience adding currency format to AmCharts graphs? So far I have tried many variations around the following with no success...
chart.numberFormatter = {
numberFormatter = numberPrefix="$";
};
For AmCharts v4 you can add a dollar sign using this:
chart.numberFormatter.numberFormat = '$#,###';
https://www.amcharts.com/docs/v4/concepts/formatters/formatting-numbers/
To add a prefix to value axis:
valueAxis.unit = "$";
valueAxis.unitPosition = "left";
In case you need this in a balloon, add it to balloonText:
graph.balloonText = "$[[value]]";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With