AnsweredAssumed Answered

How to set label for SimpleRenderer?

Question asked by MollyKFoley on Apr 12, 2018
Latest reply on Apr 12, 2018 by rscheitlin

This seems like it should be easy to understand but I'm not quite sure how to access the label property of a SimpleRenderer. I want a label to appear in the legend next to the symbol, like it does in a UniqueValueRenderer.

 

This is what I have, but the second line doesn't appear to do anything. How do I set the label?

var pcRenderer = new SimpleRenderer(new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 0, 0]), 1), new Color([255, 158, 234])));
pcRenderer.label = "Focal & Reference Areas";

Outcomes