UniqueValueRenderer QML Type

A renderer that displays different symbols based on unique values in the feature attributes. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

Renderer

Properties

Signals

Detailed Description

A unique value renderer symbolizes groups of graphics or features that have matching attributes with the same symbol. This is most common with nominal, or string data. Different groups will display with different symbols.

For example, you could use a unique value renderer to symbolize zoning designations: yellow for "Residential", purple for "Industrial", red for "Commercial", and so on. You can also use unique value renderers on numeric fields that are coded values, or on ordinal attributes such as "First", "Second", "Third", and so on.

Typically, graphics and features are rendered based on the unique values of one attribute field. However, up to three fields can be combined to generate a unique value.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

Example:

Apply a UniqueValueRenderer to a point feature layer repesenting California cities:

FeatureLayer {
    id: uniqueRendererLayer

    ServiceFeatureTable {
        url: sampleServerWildFireUrl + "/0"
    }

    UniqueValueRenderer {
        defaultLabel: "Unknown city"
        defaultSymbol: SimpleMarkerSymbol {}

        UniqueValue {
            label: "Los Angeles"
            description: "The City of Los Angeles"
            values: ["Los Angeles"]

            SimpleMarkerSymbol {
                style: Enums.SimpleMarkerSymbolStyleTriangle
                color: "green"
                size: 4.0
            }
        }

        UniqueValue {
            label: "San Francisco"
            description: "The City of San Francisco"
            values: ["San Francisco"]

            SimpleMarkerSymbol {
                style: Enums.SimpleMarkerSymbolStyleCircle
                color: "red"
                size: 5.0
            }
        }

        UniqueValue {
            label: "San Diego"
            description: "The City of San Diego"
            values: ["San Diego"]

            SimpleMarkerSymbol {
                style: Enums.SimpleMarkerSymbolStyleCross
                color: "blue"
                size: 8.0
            }
        }

        UniqueValue {
            label: "San Jose"
            description: "The City of San Jose"
            values: ["San Jose"]

            SimpleMarkerSymbol {
                style: Enums.SimpleMarkerSymbolStyleDiamond
                color: "yellow"
                size: 2.0
            }
        }
    }
}

See also JsonSerializable.

Property Documentation

defaultLabel : string

The default label.

The default label is used if the graphic or feature's attribute value does not match any of the unique values.


[default] defaultSymbol : Symbol

The default symbol.

The default symbol is used if the graphic or feature's attribute value does not match any of the unique values.


fieldNames : list<string>

A list of field names.

The names represent attributes of a graphic or feature that the renderer uses to match values against.


[default] uniqueValues : UniqueValueListModel

Returns a collection of unique values for the renderer as a UniqueValueListModel (read-only).

The UniqueValueListModel contains a list model of all the unique values defined in the renderer.

See also UniqueValueListModel.


Signal Documentation

defaultLabelChanged()

Emitted when the defaultLabel property changes.

Note: The corresponding handler is onDefaultLabelChanged.


defaultSymbolChanged()

Emitted when the defaultSymbol property changes.

Note: The corresponding handler is onDefaultSymbolChanged.


fieldNamesChanged()

Emitted when the fieldNames property changes.

Note: The corresponding handler is onFieldNamesChanged.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.