added feature to grey legend name if markers hidden