Add legends to the voting stats charts

Also fixes a small bug whereby a user with a blank name shows with no name in the stats page.