AnsweredAssumed Answered

Legend Title in 4.0

Question asked by lorieme on Jul 11, 2016
Latest reply on Jul 12, 2016 by lorieme

When I create my legend, the name from my published map service is listed at the top of the legend pane.  How do I turn if off?  I tried setting the title in the Legend widget, and I also tried hiding and replacing the label in my css (see below).  Note:  I added my feature layer using the URL.

 

css:

 

.esri-legend {

 

     background-color: #f3f3f3;

}

 

.esri-legend__service-label span {

 

     visibility: hidden;

}

 

.esri-legend__service-label span::after {

 

     content: "Legend";

}

 

 

javascript:

view.then(function() {

    var legend = new Legend({

          view: view,

          layerInfos: [{

               layer: lyrADT,

               title: "Average Daily Traffic"

          }]

     }, "legendDiv");

     legend.startup();

Outcomes