JS for the multi period stats