I have a web map with a FeatureLayer (polygons). I’m using a LabelLayer to label the polygons with a double-type field. My values in the field go to the hundredth, but some don’t. (example image below) I want to show all labels with values to the tenth, which means some will have to be rounded, and others will have to be padded on the right with “.0”
I know how to do this in ArcMap - go to the layer’s attribute table, go to the field’s numeric properties, set how many decimal places to show, also check the ‘Pad with zeros’ box. How do I accomplish this with my web map? I can’t find a decimal places setting in the documentation for LabelLayer... Is there a round/pad function I can use in the textExpression of the addFeatureLayer method? Or is there a way to set field display properties in the map service?