Title: Number formatting.
Last modified: June 3, 2020

---

# Number formatting.

 *  Resolved [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/)
 * I need to format numbers in a format of xxx.xxx.xxx,xx Is that possible with 
   Charts.js

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933380)
 * I don’t believe Chart.js has built in comma decimal support.
 * I tried a number in that format inside of a chart and it does not appear that
   Chart.js knows what to do with it.
 *  Thread Starter [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933442)
 * I found [this ](https://stackoverflow.com/questions/25880767/chart-js-number-format)
   but not sure how to implement. Can I use functions.php for it.
 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933475)
 * That adds commas into the tooltip display. It does not sadly allow for the commas
   to exist in the actual data. So you’d have to enter the data in with decimals
   and then use that to flip it around on the display end. But even then it would
   only affect the tool tips.
 * I don’t think that’s an actual workable solution sadly.
 * It’s a workaround and not even one that fixes all of the places where the numbers
   get displayed.
 *  Thread Starter [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933481)
 * Can not believe this is not avaliable 🙁
 *  Thread Starter [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933499)
 * Did you also see this:
    [https://stackoverflow.com/a/43457756](https://stackoverflow.com/a/43457756)
   They seem to have it done.
 *  Thread Starter [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933517)
 * How can I add those options: in functions.php. Can you please show me a hint?
 *  Thread Starter [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933542)
 * I can insert value 123.456 fine but when I add 123.456.789 it does not even show
   it. Could be something related to locate settings?
 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933565)
 * Seems like that might work. If I’m understanding it right, it still looks like
   you’d have to enter the data in the xxx,xxx,xxx.xx format. But that would flip
   the display of it around to use commas in the decimal place.
 * They’re using another library to handle formatting rather than trying to just
   do a string replacement which is good honestly but you’ll need to include it 
   in the page as well.
 * As for implementing it inside the plugin you’d want to probably call the code
   using an action hook.
 * Maybe this one: m_chart_after_chart_args
 * Then you could modify the chart settings to use the library when rendering the
   numbers.
 * Still yes, pain in the neck Chart.js doesn’t already support this stuff natively.
 * Chart.js is still fairly young I think and it’s just missing some features like
   this. Highcharts already includes native comma decimal support. If you aren’t
   working on a commercial project that would probably be an easier choice:
 * [https://github.com/methnen/m-chart-highcharts-library/](https://github.com/methnen/m-chart-highcharts-library/)
 *  Thread Starter [ozgurerdogan](https://wordpress.org/support/users/ozgurerdogan/)
 * (@ozgurerdogan)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933607)
 * Even I read their web site for licensing. I could be sure if I need to buy license.
   
   The web site I am making is a organisation and not a company. But they are providing
   some services and earn money. And they want to simple publish some stats on their
   site as chart. Do you think it need license?
 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/number-formatting-3/#post-12933645)
 * I’d ask Highsoft. They’re the only ones who can say for sure if what they do 
   would require a commercial license.
 *  Plugin Author [methnen](https://wordpress.org/support/users/methnen/)
 * (@methnen)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/number-formatting-3/#post-13278435)
 * Closing as I believe this has been dealt with as well as possible at this point.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Number formatting.’ is closed to new replies.

 * ![](https://ps.w.org/m-chart/assets/icon.svg?rev=3592080)
 * [M Chart](https://wordpress.org/plugins/m-chart/)
 * [Support Threads](https://wordpress.org/support/plugin/m-chart/)
 * [Active Topics](https://wordpress.org/support/plugin/m-chart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/m-chart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/m-chart/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [methnen](https://wordpress.org/support/users/methnen/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/number-formatting-3/#post-13278435)
 * Status: resolved