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 minSize
and maxSize
or stops
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.
Referenced by: Pie Chart Renderer, visualVariable
Properties
Property | Details |
---|---|
expression | Deprecated, please use valueExpression in its place. The value which allows a size to be defined based on the map scale. Currently, the only supported expression is, view.scale . |
field | Attribute field used for size rendering if no valueExpression is provided. |
legendOptions | Options available for the legend. |
maxDataValue | The maximum data value. |
maxSize | Specifies the largest marker size to use at any given map scale. Can be either a fixed number or object, depending on whether the user chose a fixed range or not. Must be one of the following values:
|
minDataValue | The minimum data value. |
minSize | Specifies the smallest marker size to use at any given map scale. Can be either a fixed number or object, depending on whether the user chose a fixed range or not. Must be one of the following values:
|
normalizationField | Attribute field used to normalize the data. |
stops[] | 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. This property is also required when setting a size visual variable to the minSize or maxSize properties based on expression (e.g. expression: 'view.scale' ). |
target | Only used when sizeInfo is used for polygon outlines. Valid value of this property outline |
type | Specifies the type of visual variable. Valid value of this property sizeInfo |
valueExpression | An Arcade expression evaluating to a number. New style is similar to $view.scale . This is used in combination with the target outline propery where the outline looks thinner at smaller scales and thicker at larger scales. |
valueExpressionTitle | The title identifying and describing the associated Arcade expression as defined in the valueExpression property. |
valueUnit | A string value indicating the required unit of measurement. |
Size visual variable with minSize/maxSize mapped to min and max data values Example
Live sample web maps showing use of the sizeInfo visual variable.
{
"type": "sizeInfo",
"field": "Deaths",
"valueUnit": "unknown",
"minSize": 6,
"maxSize": 37.5,
"minDataValue": 2814,
"maxDataValue": 121179
}
Size Visual variable with size stops for above and below visualizations Example
A color variable would be used to indicate the direction of above or below.
{
"type": "sizeInfo",
"valueExpression": "(($feature.Deaths2020 - $feature.Deaths 2015)/$feature.Deaths 2015)*100",
"stops": [
{
"value": -100,
"size": 80,
"label": "Major decline"
},
{
"value": 0,
"size": 2,
"label": "No change"
},
{
"value": 100,
"size": 80,
"label": "Major growth"
}
]
}
Size Visual variable that adjusts a data-driven range by scale Example
{
"type": "sizeInfo",
"valueExpression": "( $feature.POP_POVERTY / $feature.TOTPOP_CY ) * 100",
"legendOptions": {
"title": "% population living in poverty"
},
"maxDataValue": 44.919727292720474,
"maxSize": {
"type": "sizeInfo",
"valueExpression": "$view.scale",
"stops": [
{
"size": 60,
"value": 1128
},
{
"size": 60,
"value": 35382
},
{
"size": 37.5,
"value": 15051803
},
{
"size": 37.5,
"value": 591657528
}
]
},
"minDataValue": 15.00009676233236,
"minSize": {
"type": "sizeInfo",
"valueExpression": "$view.scale",
"stops": [
{
"size": 12,
"value": 1128
},
{
"size": 12,
"value": 35382
},
{
"size": 3,
"value": 15051803
},
{
"size": 3,
"value": 591657528
}
]
},
"valueUnit": "unknown"
}
Size Visual variable that targets background fill outline and adjusts its width by scale Example
{
"type": "sizeInfo",
"valueExpression": "$view.scale",
"stops": [
{
"size": 2,
"value": 902882
},
{
"size": 1,
"value": 2821507
},
{
"size": 0.5,
"value": 11286030
},
{
"size": 0,
"value": 22572060
}
],
"target": "outline"
}
Size Visual variable that adjusts non-data-driven icon sizes equally by scale Example
{
"type": "sizeInfo",
"valueExpression": "$view.scale",
"stops": [
{
"size": 7.5,
"value": 1155581.108577
},
{
"size": 6,
"value": 9244648.868618
},
{
"size": 3,
"value": 73957190.948944
},
{
"size": 1.5,
"value": 591657527.591555
}
]
}