hide legend display if the layer doesn't have legend