Updated JS for each chart