The colorInfo visual variable defines how a continuous color ramp is applied to features based on the values of a numeric field attribute. The minimum and maximum values of the data should be indicated along with their respective color values. You must specify either colors or stops to construct the color ramp.

See https://developers.arcgis.com/web-map-specification/objects/colorInfo_visualVariable/ https://developers.arcgis.com/web-scene-specification/objects/colorInfo_visualVariable/.

interface ColorInfoJson {
    colors?: ColorJson[];
    field: string;
    legendOptions?: {
        showLegend?: boolean;
        title?: string;
    };
    maxDataValue?: number;
    minDataValue?: number;
    normalizationField?: string;
    stops?: ColorStopJson[];
    type: "colorInfo";
}

Hierarchy (view full)

Properties

colors?: ColorJson[]

An array of colors that define the color ramp. Either colors or stops must be specified to construct the color ramp.

field: string

A string value indicating the name of the feature attribute field that contains the data value to render.

legendOptions?: {
    showLegend?: boolean;
    title?: string;
}

Type declaration

  • OptionalshowLegend?: boolean

    Indicates whether to show color/size ramp in the legend.

  • Optionaltitle?: string

    The title of the legend.

maxDataValue?: number

The maximum data value.

minDataValue?: number

The minimum data value.

normalizationField?: string

String value indicating the name of the attribute field used to normalize the data.

stops?: ColorStopJson[]

An array of stop objects.

type

The type of the VisualVariable.