Fix JS Error in correlated chart helper