{
  "title": "SizeInfo Visual Variable",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "The sizeInfo visual variable defines how size is applied to features based on the values of a numeric field attribute. The minimum and maximum values of the data should be indicated along with their respective size values. You must specify either `minSize` and `maxSize`, or `stops`, or `valueUnit` to construct the size ramp. All features with values falling in between the specified min and max data values (or stops) will be scaled proportionally between the provided min and max sizes.",
  "properties": {
    "axis": {
      "type": "string",
      "description": "Defines the axis the size visual variable should be applied to when rendering features with an ObjectSymbol3DLayer.",
      "enum": [
        "all",
        "depth",
        "height",
        "width",
        "widthAndDepth"
      ]
    },
    "field": {
      "type": "string",
      "description": "Attribute field used for size rendering if no valueExpression is provided."
    },
    "legendOptions": {
      "type": "object",
      "allOf": [
        {
          "$ref": "visualVariableLegendOptions_schema.json"
        },
        {
          "properties": {
            "customValues": {},
            "title": {},
            "showLegend": {}
          },
          "additionalProperties": false
        }
      ]
    },
    "maxDataValue": {
      "type": "number",
      "description": "The maximum data value."
    },
    "maxSize": {
      "type": "number",
      "description": "Specifies the maximum size to be applied to the symbol. This is required if valueUnit is set to `unknown`."
    },
    "minDataValue": {
      "type": "number",
      "description": "The minimum data value."
    },
    "minSize": {
      "type": "number",
      "description": "Specifies the minimum size to be applied to the symbol. This is required if valueUnit is set to `unknown`."
    },
    "normalizationField": {
      "type": "string",
      "description": "Attribute field used to normalize the data."
    },
    "stops": {
      "type": "array",
      "description": "An array of objects that defines the thematic size ramp in a sequence of data or expression stops. At least two stops are required. The stops must be listed in ascending order based on the value of the `value` property in each stop. This property is required if `minDataValue`, `maxDataValue`, `minSize`, and `maxSize` are not defined.",
      "items": {
        "type": "object",
        "$ref": "sizeStop_schema.json"
      }
    },
    "target": {
      "type": "string",
      "description": "Only used when sizeInfo is used for polygon outlines.",
      "enum": [
        "outline"
      ]
    },
    "type": {
      "type": "string",
      "description": "Specifies the type of visual variable.",
      "enum": [
        "sizeInfo"
      ]
    },
    "useSymbolValue": {
      "type": "boolean",
      "description": "When setting a size visual variable on a renderer using an ObjectSymbol3DLayer, this property indicates whether to apply the value defined by the height, width, or depth properties to the corresponding axis of this visual variable instead of proportionally scaling this axis' value after other axes."
    },
    "valueExpression": {
      "type": "string",
      "description": "An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to a number."
    },
    "valueExpressionTitle": {
      "type": "string",
      "description": "The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the `valueExpression` property."
    },
    "valueRepresentation": {
      "type": "string",
      "description": "Specifies how to apply the data value when mapping real-world sizes. See table below for supported values.",
      "enum": [
        "area",
        "diameter",
        "distance",
        "radius",
        "width"
      ]
    },
    "valueUnit": {
      "type": "string",
      "description": "A string value indicating the unit of measurement. Defaults to `meters` if not set.",
      "enum": [
        "centimeters",
        "decimal-degrees",
        "decimeters",
        "feet",
        "inches",
        "kilometers",
        "meters",
        "miles",
        "millimeters",
        "nautical-miles",
        "unknown",
        "yards"
      ]
    }
  },
  "required": [
    "type"
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "examples": [
      {
        "title": "sizeInfo",
        "description": "Live sample web scene showing [use of the sizeInfo visual variable](https://www.arcgis.com/home/webscene/viewer.html?webscene=ed2892fef34b43b8a5cc61c8ff890c6f).",
        "code": {
          "visualVariables": [
            {
              "type": "sizeInfo",
              "field": "Deaths",
              "axis": "all",
              "minSize": 6,
              "maxSize": 37,
              "minDataValue": 2814,
              "maxDataValue": 121179
            }
          ]
        }
      },
      {
        "title": "sizeInfo with stops",
        "code": {
          "visualVariables": [
            {
              "type": "sizeInfo",
              "field": "Deaths",
              "legendOptions": {
                "title": "size",
                "customValues": [
                  1,
                  2,
                  3
                ]
              },
              "stops": [
                {
                  "value": 2814,
                  "size": 6
                },
                {
                  "value": 121179,
                  "size": 37
                }
              ]
            }
          ]
        }
      }
    ]
  }
}
