The visual variable base class. See each of the subclasses that extend this class to learn how to create continuous data-driven thematic visualizations.
ColorVariable | SizeVariable | OpacityVariable | RotationVariable |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | more details The name of the class. | more details | Accessor | |
String | more details The name of the numeric attribute field that contains the data values used to determine the color/opacity/size/rotation of each feature. | more details | VisualVariable | |
Object | more details An object providing options for displaying the visual variable in the Legend. | more details | VisualVariable | |
String | more details The visual variable type. | more details | VisualVariable | |
String | more details An Arcade expression following the specification defined by the Arcade Visualization Profile. | more details | VisualVariable | |
String | more details The title identifying and describing the associated Arcade expression as defined in the valueExpression property. | more details | VisualVariable |
Property Details
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
field String
-
The name of the numeric attribute field that contains the data values used to determine the color/opacity/size/rotation of each feature.
-
legendOptions Object
-
An object providing options for displaying the visual variable in the Legend.
- Properties:
-
showLegend Boolean
Indicates whether to show the visual variable in the legend.
title StringThe title describing the visualization of the visual variable in the Legend. This takes precedence over a field alias or valueExpressionTitle.
-
type Stringreadonly
-
The visual variable type.
Possible Values:"color"|"opacity"|"rotation"|"size"
-
valueExpression String
-
An Arcade expression following the specification defined by the Arcade Visualization Profile. Expressions in visual variables may reference field values using the
$feature
global variable and must return a number.The values returned from this expression are the data used to drive the visualization as defined in the stops. This takes precedence over field. Therefore, this property is typically used as an alternative to field in visual variables.
- See also:
-
valueExpressionTitle String
-
The title identifying and describing the associated Arcade expression as defined in the valueExpression property. This is displayed as the title of the corresponding visual variable in the Legend in the absence of a provided
title
in the legendOptions property.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
* | more details Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. | more details | VisualVariable | |
Object | more details Converts an instance of this class to its ArcGIS portal JSON representation. | more details | VisualVariable |
Method Details
-
fromJSON(json){*}static
-
Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input
json
parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameter:json ObjectA JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
Returns:Type Description * Returns a new instance of this class.
-
toJSON(){Object}
-
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
Returns:Type Description Object The ArcGIS portal JSON representation of an instance of this class.