roughly finish historical chart func