Packagecom.esri.ags.components
Classpublic class Infographic
InheritanceInfographic Inheritance spark.components.supportClasses.SkinnableComponent

Since : ArcGIS API 3.5 for Flex

Displays an Infographic of one or more variables that describe the geographic context of a location.

MXML SyntaxexpandedHide MXML Syntax

The <esri:Infographic> tag inherits all of the tag attributes of its superclass and adds the following tag attributes:

  <esri:Infographic
    Properties
    url="https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer"
    proxyURL="null"
    type="null"
    countryId="null"
    datasetId="null"
    variableIds="null"
    studyArea="null"
    title="null"
    outSpatialReference="null"
    dataProvider="null"
 
    Styles
    showTitleLabel="true"
 
    Events
    dataChange="No default"
    loadStart="No default"
    complete="No default"
    fault="No default"
  />
  

Default MXML PropertystudyArea

View the examples

See also

Live sample - Infographic
Live sample - Compare Infographics


Public Properties
 PropertyDefined By
  countryId : String
The ID of the country for which data is retrieved.
Infographic
  dataProvider : IInfographicDataProvider
The infographic data provider.
Infographic
  datasetId : String
The ID of the dataset to which variables used in this Infographic belong.
Infographic
  infographicData : InfographicData
[read-only] The data displayed by the infographic.
Infographic
  outSpatialReference : SpatialReference
The spatial reference of the returned geometries.
Infographic
  proxyURL : String
The URL to proxy the enrich request through.
Infographic
  studyArea : StudyArea
The study area for this Infographic.
Infographic
  title : String
The title of the Infographic.
Infographic
  type : String
The type of infographic.
Infographic
  url : String
The url to the GeoEnrichment service that will be used to get the infographic data.
Infographic
  variableIds : Array
The set of variable ids displayed in this Infographic.
Infographic
Public Methods
 MethodDefined By
  
Creates a new Infographic.
Infographic
  
load():void
Load the new infographics data.
Infographic
Events
 Event Summary Defined By
  Dispatched when the infographic is updated.Infographic
  Dispatched when the dataProvider is updated.Infographic
  Dispatched when the dataProvider dispatched a fault event.Infographic
  Dispatched when the infographic starts loading.Infographic
Styles
 Style Description Defined By
  
showTitleLabel
Type: Boolean CSS Inheritance: no
Show the title label. The default value is true.
Infographic
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
hasData
Data available to display. Infographic
  
loading
Loading data. Infographic
  
noData
No data to display. Infographic
Public Constants
 ConstantDefined By
  TYPE_ONE_VAR : String = OneVar
[static] Constant for the "OneVar" type of Infographic.
Infographic
  TYPE_RELATED_VARIABLES : String = RelatedVariables
[static] Constant for the "RelatedVariables" type of Infographic.
Infographic
  TYPE_TAPESTRY : String = Tapestry
[static] Constant for the "Tapestry" type of Infographic.
Infographic
Property Detail
countryIdproperty
countryId:String

The ID of the country for which data is retrieved.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get countryId():String
    public function set countryId(value:String):void
dataProviderproperty 
dataProvider:IInfographicDataProvider

The infographic data provider. If not set, the Infographic uses the arcgis.com GeoEnrichment service. You can set this property with an InfographicDataProvider object to display infographic data you already have.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get dataProvider():IInfographicDataProvider
    public function set dataProvider(value:IInfographicDataProvider):void

See also

datasetIdproperty 
datasetId:String

The ID of the dataset to which variables used in this Infographic belong.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get datasetId():String
    public function set datasetId(value:String):void
infographicDataproperty 
infographicData:InfographicData  [read-only]

The data displayed by the infographic.

This property can be used as the source for data binding.


Implementation
    public function get infographicData():InfographicData
outSpatialReferenceproperty 
outSpatialReference:SpatialReference

The spatial reference of the returned geometries.

This property can be used as the source for data binding.


Implementation
    public function get outSpatialReference():SpatialReference
    public function set outSpatialReference(value:SpatialReference):void
proxyURLproperty 
proxyURL:String

The URL to proxy the enrich request through.

This property can be used as the source for data binding.


Implementation
    public function get proxyURL():String
    public function set proxyURL(value:String):void
studyAreaproperty 
studyArea:StudyArea

The study area for this Infographic.

This property can be used as the source for data binding.


Implementation
    public function get studyArea():StudyArea
    public function set studyArea(value:StudyArea):void
titleproperty 
title:String

The title of the Infographic.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get title():String
    public function set title(value:String):void
typeproperty 
type:String

The type of infographic. The possible values are "OneVar", "RelatedVariables" and "Tapestry" By setting this value, the styleName of this Infographic will be updated to select the corresponding skin.

This property can be used as the source for data binding.


Implementation
    public function get type():String
    public function set type(value:String):void
urlproperty 
url:String

The url to the GeoEnrichment service that will be used to get the infographic data.

The default value is "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer".

This property can be used as the source for data binding.


Implementation
    public function get url():String
    public function set url(value:String):void
variableIdsproperty 
variableIds:Array

The set of variable ids displayed in this Infographic.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get variableIds():Array
    public function set variableIds(value:Array):void

See also

Constructor Detail
Infographic()Constructor
public function Infographic()

Creates a new Infographic.

Method Detail
load()method
public function load():void

Load the new infographics data.

Event Detail
complete Event
Event Object Type: com.esri.ags.events.InfographicEvent
InfographicEvent.type property = com.esri.ags.events.InfographicEvent.COMPLETE

Dispatched when the infographic is updated.

Defines the value of the type property of the event object for a complete event.
dataChange Event  
Event Object Type: mx.events.FlexEvent
FlexEvent.type property = mx.events.FlexEvent.DATA_CHANGE

Dispatched when the dataProvider is updated.

fault Event  
Event Object Type: mx.rpc.events.FaultEvent
FaultEvent.type property = mx.rpc.events.FaultEvent.FAULT

Dispatched when the dataProvider dispatched a fault event.

loadStart Event  
Event Object Type: com.esri.ags.events.InfographicEvent
InfographicEvent.type property = com.esri.ags.events.InfographicEvent.LOAD_START

Dispatched when the infographic starts loading.

Defines the value of the type property of the event object for a loadStart event.
Constant Detail
TYPE_ONE_VARConstant
public static const TYPE_ONE_VAR:String = OneVar

Constant for the "OneVar" type of Infographic.

TYPE_RELATED_VARIABLESConstant 
public static const TYPE_RELATED_VARIABLES:String = RelatedVariables

Constant for the "RelatedVariables" type of Infographic.

TYPE_TAPESTRYConstant 
public static const TYPE_TAPESTRY:String = Tapestry

Constant for the "Tapestry" type of Infographic.

Examples
MXML to display an Infographic of the Average Household Size variable using the OneVar skin:
 <esri:Infographic id="infographic"
                   type="OneVar"
                   variableIds="[KeyGlobalFacts.AVGHHSZ]"s>
     <geoEnrichmentClasses:GeometryStudyArea id="geometryStudyArea"
                                             returnGeometry="true">
         <geoEnrichmentClasses:options>
             <geoEnrichmentClasses:RingBuffer radii="[1]" units="esriMiles" />
         </geoEnrichmentClasses:options>
         <geoEnrichmentClasses:geometry>
             <esri:WebMercatorMapPoint lon="-122.45" lat="37.75" />
         </geoEnrichmentClasses:geometry>
         <geoEnrichmentClasses:comparisonGeographyLevels>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin3"/>
             <geoEnrichmentC>asses:GeographyLevel layerId="Admin2"/>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin1"/>
         </geoEnrichmentClasses:comparisonGeographyLevels>
     </geoEnrichmentClasses:GeometryStudyArea>
 </esri:Infographic>
MXML to display an Infographic of the households by income variables using the RelatedVariables skin:
 <esri:Infographic id="infographic"
                   type="RelatedVariables"
                   variableIds="[HouseholdsByIncome.*]">
     <geoEnrichmentClasses:GeometryStudyArea id="geometryStudyArea"
                                             returnGeometry="true">
         <geoEnrichmentClasses:options>
             <geoEnrichmentClasses:RingBuffer radii="[1]" units="esriMiles" />
         </geoEnrichmentClasses:options>
         <geoEnrichmentClasses:geometry>
             <esri:WebMercatorMapPoint lon="-122.45" lat="37.75" />
         </geoEnrichmentClasses:geometry>
         <geoEnrichmentClasses:comparisonGeographyLevels>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin3"/>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin2"/>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin1"/>
         </geoEnrichmentClasses:comparisonGeographyLevels>
     </geoEnrichmentClasses:GeometryStudyArea>
 </esri:Infographic>
MXML to display an Infographic of the tapestry variables:
 <esri:Infographic id="infographic"
                   type="Tapestry"
                   variableIds="[Tapestry.*]">
     <geoEnrichmentClasses:GeometryStudyArea id="geometryStudyArea"
                                             returnGeometry="true">
         <geoEnrichmentClasses:options>
             <geoEnrichmentClasses:RingBuffer radii="[1]" units="esriMiles" />
         </geoEnrichmentClasses:options>
         <geoEnrichmentClasses:geometry>
             <esri:WebMercatorMapPoint lon="-122.45" lat="37.75" />
         </geoEnrichmentClasses:geometry>
         <geoEnrichmentClasses:comparisonGeographyLevels>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin3"/>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin2"/>
             <geoEnrichmentClasses:GeographyLevel layerId="Admin1"/>
         </geoEnrichmentClasses:comparisonGeographyLevels>
     </geoEnrichmentClasses:GeometryStudyArea>
 </esri:Infographic>