Skip to content
import AuthoringInfoVisualVariable from "@arcgis/core/renderers/support/AuthoringInfoVisualVariable.js";
Inheritance:
AuthoringInfoVisualVariableAccessor
Since
ArcGIS Maps SDK for JavaScript 4.6

Contains authoring properties of visual variables generated from one of the Smart Mapping methods or sliders.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

endTime

Property
Type
string | number | null | undefined

If an age or timeline renderer was generated, indicates the end time of the visualization.

field

Property
Type
string | null | undefined

Indicates the field name used for generating the data-driven visualization. Applies to age renderer or reference size visualizations (i.e. when theme is reference-size). This property is used for UI purposes only.

maxSliderValue

Property
Type
number | null | undefined

Indicates the value of the upper handle if a slider was used to generate the visual variable.

minSliderValue

Property
Type
number | null | undefined

Indicates the value of the lower handle if a slider was used to generate the visual variable.

normalizationField

Property
Type
string | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.30

Only applicable when theme is reference-size. Indicates the attribute field the user chose in the Smart Mapping gallery for normalizing data in the selected field. This property is used for UI purposes only.

referenceSizeScale

Property
Type
number | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.30

Only applicable when theme is reference-size. This value indicates the reference scale used in a reference size visualization and must be generated as part of the createContinuousRenderer() or updateRendererWithReferenceSize() methods.

When defined, the reference scale ensures the reference size symbols scale in size as the user zooms in and out in the view. This ensures symbols remain coincident to one another and avoid overlapping.

referenceSizeSymbolStyle

Property
Type
ReferenceSizeSymbolStyle | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.30

Only applicable when theme is reference-size. This value specifies the style (or shape) of the symbols generated with a reference line. Typically, a reference line is used to visualize the maximum possible size (i.e. data value) of a data-driven proportional symbol. Visualizations with a reference size must be defined in a ClassBreaksRenderer or UniqueValueRenderer with a CIMSymbol containing two symbol layers: one visualizing the maximum size of the symbol as a hollow ring, and the other as a solid shape whose size is driven by a data value set in the renderer's field property, and configured in a primitive override of the CIMSymbol. These renderers must not contain size visual variables, but may contain other visual variable types. This property is used for UI purposes only. When defined, sizeStops must also be defined for the legend to properly represent the visualization.

sizeStops

autocast Property
Type
SizeStop[] | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.30

Only applicable when theme is reference-size or spike. An array of objects that defines the thematic size ramp for reference-size or spike visualization. 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 when theme is reference-size or spike for the legend to properly render the size reference or spike symbol style along with its labels.

spikeSymbolStyle

Property
Type
SpikeSymbolStyle | null | undefined
Since
ArcGIS Maps SDK for JavaScript 4.33

Only applicable when theme is spike. This value specifies the style (or shape) of the symbols generated with a spike renderer. Visualizations with a spike size must be defined in a ClassBreaksRenderer or UniqueValueRenderer with a CIMSymbol. These renderers must not contain size visual variables, but may contain other visual variable types. This property is used for UI purposes only. When defined, sizeStops must also be defined for the legend to properly represent the visualization.

startTime

Property
Type
string | number | null | undefined

If an age or timeline renderer was generated, indicates the start time of the visualization.

style

Property
Type
AuthoringInfoVisualVariableStyles | null | undefined

If the UI offers the option to display values based on a ratio or percentage, this indicates which selection was made.

theme

Property
Type
AuthoringInfoVisualVariableThemes | null | undefined

Indicates the theme selected by the user when generating a renderer or visual variable with one of the Smart Mapping functions.

type

Property
Type
AuthoringInfoVisualVariableTypes | null | undefined

The type of visual variable generated.

units

Property
Type
AuthoringInfoVisualVariableUnits | null | undefined

If an age or timeline renderer was generated, indicates the time units used.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone(): AuthoringInfoVisualVariable
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

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.

Parameters
ParameterTypeDescriptionRequired
json
any

A 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
any

Returns a new instance of this class.

clone

Method
Signature
clone (): AuthoringInfoVisualVariable

Creates a deep clone of the instance.

Returns
AuthoringInfoVisualVariable

A deep clone of the object that invoked this method.

Example
// Creates a deep clone of the authoring info visual variable
let authInfoVV = layer.renderer.authoringInfo.visualVariables.find(function(vv){
return vv.type === "color";
}).clone();

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.