Skip to content
import VoxelVariableStyle from "@arcgis/core/layers/voxel/VoxelVariableStyle.js";
Inheritance:
VoxelVariableStyleAccessor
Since
ArcGIS Maps SDK for JavaScript 4.25

The VoxelVariableStyle allows you to define how an individual variable is rendered. The transferFunction and isosurfaces properties apply to continuous variables, while the uniqueValues property applies to discrete variables.

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.
Example
// Typical usage
let vxlVariableStyle = new VoxelVariableStyle({
variableId: 0,
transferFunction: {
interpolation: "linear",
stretchRange: [-803.3854370117188, 804.6875],
colorStops: [
{
color: [23, 244, 247, 255],
position: 0
},
{
color: [87, 25, 244, 255],
position: 0.5
},
{
color: [255, 37, 245, 255],
position: 1
}
],
rangeFilter: {
range: [-1000, 1000]
}
},
isosurfaces: [
{
color: [102, 136, 248, 255],
value: -374.6990966796875,
label: "f32 data -1000 to 1000"
}
],
label: "f32 data -1000 to 1000"
});

Properties

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

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

isosurfaces

autocast Property
Type
Collection<VoxelIsosurface>

The collection of continuous variable isosurfaces.

label

Property
Type
string

The variable label.

Default value
""

transferFunction

autocast Property
Type
VoxelTransferFunctionStyle

The transferFunction describes how to render continuous variable volumes and sections.

uniqueValues

autocast Property
Type
Collection<VoxelUniqueValue>

The collection of unique values describes how to render discrete variable volumes and sections.

variableId

Property
Type
number

Id of the VoxelVariable that the style applies to.

Default value
0

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone(): VoxelVariableStyle
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 (): VoxelVariableStyle

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
VoxelVariableStyle

A deep clone of the class instance that invoked this method.

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.