window.$ = $;
First line will make JQuery available on the page, second will allow you to get ID of the chart you want to change. Then you can bind code like this to change event of the dropdown and change base unit dynamically:
You’ll obviously need to customize it, so it can read value from the dropdown and change baseUnit to an appropriate one, but this should work. Tell us if you’ll experience any trouble, we’ll try to find a way to resolve it.