This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/renderers/UniqueValueRenderer.html.
Packagecom.esri.ags.renderers
Classpublic class UniqueValueRenderer
InheritanceUniqueValueRenderer Inheritance Renderer Inheritance Object

Since : ArcGIS API for Flex 1.2

A unique value renderer symbolizes groups of graphics that have matching attributes.

Default MXML Propertyinfos

View the examples

See also

com.esri.ags.renderers.supportClasses.UniqueValueInfo
Live sample - Using UniqueValueRenderer


Public Properties
 PropertyDefined By
  attribute : String
Deprecated Since 2.5: Please Use field
The name of the attribute field to check for 'value'.
UniqueValueRenderer
  attribute2 : String
Deprecated Since 2.5: Please Use field2
Second attribute (if any).
UniqueValueRenderer
  attribute3 : String
Deprecated Since 2.5: Please Use field3
Third attribute (if any).
UniqueValueRenderer
  attributeDelimiter : String
Deprecated Since 2.5: Please Use fieldDelimiter
Attribute delimiter between first and second, and second and third attributes.
UniqueValueRenderer
  defaultLabel : String
The default label for this unique value.
UniqueValueRenderer
  defaultSymbol : Symbol
The default symbol to use (if value is not in any of the UniqueValueInfo infos).
UniqueValueRenderer
  field : String
The name of the attribute field to check for 'value'.
UniqueValueRenderer
  field2 : String
Second attribute field (if any).
UniqueValueRenderer
  field3 : String
Third attribute field (if any).
UniqueValueRenderer
  fieldDelimiter : String
Attribute delimiter between first and second, and second and third attributes.
UniqueValueRenderer
  infos : Array
Array of UniqueValueInfo.
UniqueValueRenderer
Public Methods
 MethodDefined By
  
UniqueValueRenderer(field:String = null, defaultSymbol:Symbol = null, infos:Array = null)
Creates a new UniqueValueRenderer object.
UniqueValueRenderer
 Inherited
Subclasses must override this method.
Renderer
Property Detail
attributeproperty
attribute:String
Deprecated Since 2.5: Please Use field

The name of the attribute field to check for 'value'.


Implementation
    public function get attribute():String
    public function set attribute(value:String):void
attribute2property 
attribute2:String
Deprecated Since 2.5: Please Use field2

Second attribute (if any).


Implementation
    public function get attribute2():String
    public function set attribute2(value:String):void
attribute3property 
attribute3:String
Deprecated Since 2.5: Please Use field3

Third attribute (if any).


Implementation
    public function get attribute3():String
    public function set attribute3(value:String):void
attributeDelimiterproperty 
attributeDelimiter:String
Deprecated Since 2.5: Please Use fieldDelimiter

Attribute delimiter between first and second, and second and third attributes.


Implementation
    public function get attributeDelimiter():String
    public function set attributeDelimiter(value:String):void
defaultLabelproperty 
public var defaultLabel:String

The default label for this unique value.

defaultSymbolproperty 
public var defaultSymbol:Symbol

The default symbol to use (if value is not in any of the UniqueValueInfo infos).

fieldproperty 
public var field:String

Since : ArcGIS API for Flex 2.5 (replacing 'attribute')

The name of the attribute field to check for 'value'.

field2property 
public var field2:String

Since : ArcGIS API for Flex 2.5 (replacing 'attribute2')

Second attribute field (if any).

field3property 
public var field3:String

Since : ArcGIS API for Flex 2.5 (replacing 'attribute3')

Third attribute field (if any).

fieldDelimiterproperty 
public var fieldDelimiter:String

Since : ArcGIS API for Flex 2.5 (replacing 'attributeDelimiter')

Attribute delimiter between first and second, and second and third attributes.

The default value is "" (empty string).

infosproperty 
public var infos:Array

Array of UniqueValueInfo.

See also

Constructor Detail
UniqueValueRenderer()Constructor
public function UniqueValueRenderer(field:String = null, defaultSymbol:Symbol = null, infos:Array = null)

Creates a new UniqueValueRenderer object.

Parameters
field:String (default = null) — The name of the attribute field to check for 'value'.
 
defaultSymbol:Symbol (default = null) — The default symbol to use (if value is not in any of the UniqueValueInfo infos).
 
infos:Array (default = null) — Array of UniqueValueInfo.
Examples
MXML to use a UniqueValueRenderer:
 <esri:UniqueValueRenderer field="ZONING">
     <esri:UniqueValueInfo value="Residential" symbol="{rFill}"/>
     <esri:UniqueValueInfo value="Industrial" symbol="{gFill}"/>
     <esri:UniqueValueInfo value="Commercial" symbol="{bFill}"/>
 </esri:UniqueValueRenderer>
ActionScript to use a UniqueValueRenderer:
var uniqueValuerenderer:UniqueValueRenderer = new UniqueValueRenderer();
 uniqueValuerenderer.field = "ZONING";
 var uniqueValueInfos:Array = [];
 uniqueValueInfos.push(new UniqueValueInfo(rFill, "Residential"));
 uniqueValueInfos.push(new UniqueValueInfo(gFill, "Industrial"));
 uniqueValueInfos.push(new UniqueValueInfo(bFill, "Commercial"));
 uniqueValuerenderer.infos = uniqueValueInfos;
 graphicsLayer.renderer = uniqueValuerenderer;