collapse legend by default and allow toggling