It is possible to disable a title for a specific layer within a service when loaded into the Legend Widget?
Yes. But an easy way to verify this is to use the browser debug tools. For example in Chrome you can right-click on the legend label you want to hide and select the Inspect Element option from the menu to display the element and associated css. Here's a screen shot that shows the elements tab after I select Inspect Element. If you look at the highlighted class that's the label I want to hide. Look up a few nodes and you'll see a div with a class of esriLegendService. The id for that div is the one you'll want to use.
Are you talking about the Legend Widget for Web AppBuilder ? If you are not can you post an example of what legend widget you are talking about?
Try either of these CSS:
This one disables the bold "cemetery" below
This one disables the "Cemetery Plots" below
If you are trying to disable one title and not another that will be more work.
Yes, I am trying to disable on and not the other. I had seen the CSS before. The only thing I can do is to ungroup the layers and post them as their own service, which is going to be make too many services to deal with, not to mention too many threads started on the server than is necessary. I guess I could build a legend widget from scratch...
Arjun Dongre have you seen this:
I did run across that thread. It won't help me. Thanks for your help so far!
If you know the id of the layer you want to disable the legend label for you could add a css rule specific to that layer. So if my layer id was Naperville_Restaurants_505 I'd do something like this:
So to be clear on syntax: I have 5 layers within my dynamic map service. One is called "Address Points". The div id for the legend is just "legend". So the call would be #legend_Address_Points.esriLegendServiceLabel?
Added an ID to the dynamic service and was able to mess around with the CSS much more easily.
I believe it would be #legend_Address_Points .esriLegendServiceLabel (you have to include the space after the "s" and before the period).
Looks like an on the fly id (#esri_dijit_Legend_0_layer0_0), but it worked. Thank you Kelly.
Retrieving data ...