This sample shows how to visualize and change the properties of a discrete variable using uniqueValues on a VoxelLayer.
If the variable of the voxel layer contains qualitative data, for example, the soil types defined in discrete classes, the data is visualized using uniqueValues. The uniqueValues describe how to render both discrete variable volumes and sections. Use the method get
of VoxelLayer to get the selected variable's VoxelVariableStyle
const currentVariableStyle = vxlLayer.getVariableStyle(null);
const uniqueValue = currentVariableStyle.uniqueValues.getItemAt(i);
uniqueValue.color = new Color("#00FF00");
uniqueValue.enabled = true; //whether or not to render the data
uniqueValue.label = "Gravel";