add legend to events