adding legends to charts