mykola-digtiar / chartjs-plugin-piechart-outlabels

Highly customizable Chart.js plugin that displays labels outside the pie/doughnut chart.
https://piechart-outlabels.netlify.com/sample/
MIT License
51 stars 38 forks source link

Outlabel formatting - need to add thousandths separator #31

Open jarrodwhitley opened 1 year ago

jarrodwhitley commented 1 year ago

When using %v to display the label value in the outlabel.text options I'm unable to add a thousandths separator. I'm showing currency so this is important for my purposes.

I'd prefer to be able to return my own value like so:

outlabels: {
        text: ['Label \n $1,000', 'Label \n $2,000', 'Label \n $,3000']

Is there a way to format the %v value or to pass my own data in to the labels?