import AuthoringInfoVisualVariable from "@arcgis/core/renderers/support/AuthoringInfoVisualVariable.js";const AuthoringInfoVisualVariable = await $arcgis.import("@arcgis/core/renderers/support/AuthoringInfoVisualVariable.js");- Inheritance:
- AuthoringInfoVisualVariable→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.6
Contains authoring properties of visual variables generated from one of the Smart Mapping methods or sliders.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| |
normalizationField
- 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
- 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
- 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
- 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
- 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.
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
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
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | 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
- 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 variablelet authInfoVV = layer.renderer.authoringInfo.visualVariables.find(function(vv){ return vv.type === "color";}).clone(); toJSON
- Signature
-
toJSON (): any
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.