javascriptamcharts

Adding currency prefix to AmCharts


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="$";
};

Solution

  • 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]]";