Hide Default Symbol in Legend Widget WAB 2.6

422
2
Jump to solution
09-07-2018 01:55 AM
SivaramKrishnan2
New Contributor III

Hi

I'm adding dynamically created feature layer in WAB 2.6

In legend widget i could see the legend info also, but i want to hide the other values present in the legend.

please refer the screenshot.

i want to hide that "all other values" in Legend widget of WAB 2.6

Thanks & Regards

Siva

0 Kudos
1 Solution

Accepted Solutions
SivaramKrishnan2
New Contributor III

Robert,

I did the same while getting the renderer response from the smartMapping.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

After the legend is created use this code:

          setTimeout(function(){
            query(".esriLegendLayer>tbody>tr>td>table>tbody>tr>td").forEach(function(node){
              if(node.innerHTML == '<all other values>'){
              node.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.style.display = 'none';
              }
            });
          }, 500);
SivaramKrishnan2
New Contributor III

Robert,

I did the same while getting the renderer response from the smartMapping.

0 Kudos