collapse legend