changed $legendExtraView to array to allow for multiple commands