AnsweredAssumed Answered

How to remove default symbol and default label from legend widget (WAB dev ed 2.7)

Question asked by kericks on Feb 7, 2018
Latest reply on Feb 7, 2018 by kericks

I have a geoprocessing widget that consumes a geoprocessing service which has several feature class output parameters. One of the output feature classes is symbolized with unique values in the configuration of the geoprocessing widget.  The widget configuration does not have an option to remove the default symbol or default label so the Legend widget shows a symbol and label ("others") that I do not want since all my unique values are accounted for.

 

I'm sure there are multiple ways to remove this in code but I really just need a quick hack for this particular app and the code in \WebAppBuilderForArcGIS\server\apps\2\jimu.js\LayerInfos\LayerInfoForDefault.js looked promising but so far no luck with the changes I've tried there. Can someone point me towards the code where the default symbol and default label in the legend are generated?  I can essentially hide the symbol by making it tiny but can't get rid of the default label "others". I've looked at the code for both the geoprocessing and legend widgets and don't see an easy solution there.

Outcomes