mm.js - Change Currency and Locale Documentation

Change the Currency and Locale of an embedded Chart or Calculator

mm.js - Change Currency and Locale Documentation

It’s simple to change the currency of a mm.js chart.

Just call moneymage.setLocaleCurrency()

The defaults are Money Mage currency and locale are: GBP for currency and en-GB for locale.

How to Embed

If you are using WordPress use the HTML editor.

1. Include the required dependencies

Add the following scripts to your page:

<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>

These are required dependencies for mm.js. They are all minified, compressed, and served via a reliable Content Distribution Network to improve your site speed.

2. Add a containing div to your page or article

Insert a containing div to your page or article where you would like the chart to appear.

Specify an ID that you will use later.

<div id="compound-interest-chart"></div>

The chart will be inserted at this location.

3. Call mm.js to insert the chart

You are now ready to add the chart!

Insert a <script> ... </script> block to the bottom of your page.

Add the following script to your page or article.

The arguments you provide will change the behaviour of the chart.

moneymage.setLocaleCurrency("en-US", "USD");
moneymage.ready(() => {
    var principal = 0;
    var interestRate = 3.0/100.0;
    var monthlyContributions = 100;
    var months = 25 * 12;




Set the currency and locale used by mm.js


Parameter Type Description
locale string An IETF BCP 47 locale, i.e. en-GB, en-US.
currency string An ISO currency code, i.e. GBP, USD, JPY


    moneymage.setLocaleCurrency("ja-JP", "JPY");