Chartjs-How to make money format in chart js in javascript

0👍

You can try this:

const formatter = new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
});
...
options: {
  tooltips: {
    callbacks: {
      label: function(tooltipItem, data) {
        return formatter.format(tooltipItem.yLabel);
      },
    },
  },
},

example

Leave a comment