Use new ee() function, remove duplicate google chart code