Some work on legend control