UniqueValue Renderer

This renderer symbolizes features based on one or more matching string attributes.

Properties

Property Details
authoringInfo An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
backgroundFillSymbol A symbol used for polygon features as a background if the renderer uses point symbols, e.g. for bivariate types & size rendering. Only applicable to polygon layers. PictureFillSymbols can also be used outside of the Map Viewer for Size and Predominance and Size renderers.
defaultLabel Default label for the default symbol used to draw unspecified values.
defaultSymbol Symbol used when a value cannot be matched.
field1 Attribute field renderer uses to match values.
field2 If needed, specify an additional attribute field the renderer uses to match values.
field3 If needed, specify an additional attribute field the renderer uses to match values.
fieldDelimiter String inserted between the values if multiple attribute fields are specified.
legendOptions A legend containing one title, which is a string describing the renderer in the legend.
rotationExpression A constant value or an expression that derives the angle of rotation based on a feature attribute value. When an attribute name is specified, it's enclosed in square brackets. Rotation is set using a visual variable of type rotationInfo with a specified field or valueExpression property.
rotationType String property which controls the origin and direction of rotation. If the rotationType is defined as arithmetic the symbol is rotated from East in a counter-clockwise direction where East is the 0 degree axis. If the rotationType is defined as geographic, the symbol is rotated from North in a clockwise direction where North is the 0 degree axis.
If property is present, must be one of the following values:
  • arithmetic
  • geographic
type Specifies the type of renderer used.
Value of this property must be uniqueValue
uniqueValueInfos An array of uniqueValueInfo objects.
valueExpression An Arcade expression evaluating to either a string or a number.
valueExpressionTitle The title identifying and describing the associated Arcade expression as defined in the valueExpression property.
visualVariables An array of objects used to set rendering properties.

Example

Live sample web maps showing uniqueValue renderer

{
  "renderer": {
    "type": "uniqueValue",
    "field1": "COUNTRY",
    "uniqueValueInfos": [
      {
        "value": "US",
        "symbol": {
          "color": [
            253,
            127,
            111,
            255
          ],
          "size": 12.75,
          "angle": 0,
          "xoffset": 0,
          "yoffset": 0,
          "type": "esriSMS",
          "style": "esriSMSCircle",
          "outline": {
            "color": [
              26,
              26,
              26,
              255
            ],
            "width": 0.75,
            "type": "esriSLS",
            "style": "esriSLSSolid"
          }
        },
        "label": "US"
      },
      {
        "value": "Canada",
        "symbol": {
          "color": [
            126,
            176,
            213,
            255
          ],
          "size": 12.75,
          "angle": 0,
          "xoffset": 0,
          "yoffset": 0,
          "type": "esriSMS",
          "style": "esriSMSCircle",
          "outline": {
            "color": [
              26,
              26,
              26,
              255
            ],
            "width": 0.75,
            "type": "esriSLS",
            "style": "esriSLSSolid"
          }
        },
        "label": "Canada"
      },
      {
        "value": "Brazil",
        "symbol": {
          "color": [
            178,
            224,
            97,
            255
          ],
          "size": 12.75,
          "angle": 0,
          "xoffset": 0,
          "yoffset": 0,
          "type": "esriSMS",
          "style": "esriSMSCircle",
          "outline": {
            "color": [
              26,
              26,
              26,
              255
            ],
            "width": 0.75,
            "type": "esriSLS",
            "style": "esriSLSSolid"
          }
        },
        "label": "Brazil"
      },
      {
        "value": "Mexico",
        "symbol": {
          "color": [
            189,
            126,
            190,
            255
          ],
          "size": 12.75,
          "angle": 0,
          "xoffset": 0,
          "yoffset": 0,
          "type": "esriSMS",
          "style": "esriSMSCircle",
          "outline": {
            "color": [
              26,
              26,
              26,
              255
            ],
            "width": 0.75,
            "type": "esriSLS",
            "style": "esriSLSSolid"
          }
        },
        "label": "Mexico"
      }
    ]
  }
}

Feedback on this topic?