update legend formatting