Renderer objects

This topic discusses the JSON representation of renderer objects. The following renderers are discussed here:

  • Simple renderer
  • Unique value renderer
  • Class breaks renderer

Simple renderer

A simple renderer is a renderer that uses one symbol only. The type property for simple renderers is simple. The rotationType property 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° axis. If the rotationType is defined as geographic, the symbol is rotated from north in a clockwise direction where north is the 0° axis. The rotationExpression property is a constant value or an expression that derives the angle of rotation based on the feature attribute value. When an attribute name is specified in rotationExpression, it's enclosed in square brackets, for example, [Rotation].

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "type" : "simple",
  "symbol" :  <symbol>,
  "label" : "<label>",
  "description" : "<description>",
  "rotationType": "<arithmetic | geographic>",
  "rotationExpression": "<expression>"
}

Unique value renderer

A unique value renderer symbolizes groups of features that have matching field values. The type property for unique value renderers is uniqueValue. The rotationType property 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° axis. If the rotationType is defined as geographic, the symbol is rotated from north in a clockwise direction where north is the 0° axis. The rotationExpression property is a constant value or an expression that derives the angle of rotation based on the feature attribute value. When an attribute name is specified in rotationExpression, it's enclosed in square brackets, for example, [Rotation].

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  "type" : "uniqueValue",
  "field1" : "<field1>",
  "field2" : "<field2>",
  "field3" : "<field3>",
  "fieldDelimiter" : "<fieldDelimiter>",
  "defaultSymbol" :  <symbol>,
  "defaultLabel" : "<defaultLabel>",
  "uniqueValueInfos" : [
    {
      "value" : "<value1>",
      "label" : "<label1>",
      "description" : "<description1>",
      "symbol" :  <symbol1>
    },
    {
      "value" : "<value2>",
      "label" : "<label2>",
      "description" : "<description2>",
      "symbol" :  <symbol2>
    }
  ],
  "rotationType": "<arithmetic | geographic>",
  "rotationExpression": "<expression>"
}

Class breaks renderer

A class breaks renderer symbolizes each feature based on the value of some numeric field. The type property for class breaks renderer is classBreaks. The rotationType property 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° axis. If the rotationType is defined as geographic, the symbol is rotated from north in a clockwise direction where north is the 0° axis. The rotationExpression property is a constant value or an expression that derives the angle of rotation based on the feature attribute value. When an attribute name is specified in rotationExpression, it's enclosed in square brackets, for example, [Rotation].

The classificationMethod property determines the classification method that was used to generate class breaks. The normalizationType property accepts either normalizationField, normalizationType, and normalizationTotal. Use normalizationType to determine how the data was normalized. If normalizationType is missing, it means no normalization was applied. When normalizationType is esriNormalizeByField, use normalizationField to determine the field used to normalize the data. When normalizationType is esriNormalizeByPercentOfTotal, use normalizationTotal to determine the total value. The defaultSymbol property symbolizes features whose value does not belong in any of the specified classBreaks. The backgroundFillSymbol property symbolizes polygon features with proportional symbols, use backgroundFillSymbol to specify a simple fill symbol to represent polygon features, and use marker symbols of varying sizes in classBreakInfos to indicate the quantity.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
  "type": "classBreaks",
  "field": "<field>",
  "classificationMethod": "<classification method>",
  "normalizationType": "<esriNormalizeByField | esriNormalizeByLog | esriNormalizeByPercentOfTotal>",
  "normalizationField": "<normalization field>", //when normalizationType is esriNormalizeByField
  "normalizationTotal": <total value>, //when normalizationType is esriNormalizeByPercentOfTotal
  "defaultSymbol": <symbol>,
  "defaultLabel": "<label>",
  "backgroundFillSymbol": <simple fill symbol>, //supported only for polygon features
  "minValue": <minValue>, //when missing, it defaults to 0
  "classBreakInfos": [
    {
      "classMaxValue": <classMaxValue1>,
      "label": "<label1>",
      "description": "<description1>",
      "symbol":  <symbol1>
    },
    {
      "classMaxValue": <classMaxValue2>,
      "label": "<label2>",
      "description": "<description2>",
      "symbol":  <symbol2>
    }
  ],
  "rotationType": "<arithmetic | geographic>",
  "rotationExpression": "<expression>"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.