Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: InfographicsOptions

dojo.require("esri.dijit.geoenrichment.InfographicsOptions");

Description

(Added at v3.6)
InfographicsOptions is used to customize and configure the Infographic's included in a InfographicCarousel. Used in favor of the options property of InfographicsCarousel.

Samples

Search for samples that use this class.

Constructors

NameSummary
new esri.dijit.geoenrichment.InfographicsOptions(json?)Constructs instance from serialized state.

CSS

esri/dijit/geoenrichment/InfographicsOptions | Download source

Properties

NameTypeSummary
studyAreaOptionsRingBuffer | DriveBuffer | IntersectingGeographiesThe options to apply to the study area.
themeStringThe name of the css theme used to format the InfographicsCarousel.

Methods

NameReturn typeSummary
getItems(countryID)PromiseGets an array of default InfographicsOptions.Item's in the InfographicsCarousel with a countryID.
toJson()ObjectConverts object to its JSON representation.
Constructor Details

new esri.dijit.geoenrichment.InfographicsOptions(json?)

Constructs instance from serialized state.
Parameters:
<Object> json Optional Various options to configure this InfographicsOptions. Any property can be passed into this object.
Sample:
var options = new esri.dijit.geoenrichment.InfographicsOptions({
  theme: "light",
  studyAreaOptions: new esri.tasks.geoenrichment.DriveBuffer({radii: [ 2 ], units: "esriMiles"})
});
Property Details
The options to apply to the study area. The default value is a RingBuffer with 1-mile radius.
Default value: new RingBuffer({"radii": [ 1 ], "units": "esriMiles"})

<String> theme

The name of the css theme used to format the InfographicsCarousel.
Known values: "light" | "common"
Default value: "common"
Method Details

getItems(countryID)

Gets an array of default InfographicsOptions.Item's in the InfographicsCarousel with a countryID. You may use this method to add Infographic's to or remove Infographic's from a InfographicsCarousel.
Return type: Promise
Parameters:
<String> countryID Required The ID of the country for which data is retrieved.

Refer to the GeoEnrichment Coverage section of the ArcGIS GeoEnrichment Service documentation to find the countries where data are available. The "Two-Digit Country Code" column in the first table lists all the country codes you may use.
Sample:
var infographics = new esri.dijit.geoenrichment.InfographicsCarousel({
  studyArea: new esri.tasks.geoenrichment.GeometryStudyArea({ geometry: new esri.geometry.Point(-120.44,34.95) }),
}, "infographics");

var options = new esri.dijit.geoenrichment.InfographicsOptions();

options.getItems("US").then(function(items){
  //make default infographics invisible
  for (var i = 0; i < items.length; i++) {
    items[i].isVisible = false;
  };

  //create a new infographic
  var item = new esri.dijit.geoenrichment.InfographicsOptions.Item("OneVar", ["Wealth.PCI_CY"]);
  item.title = "Wealth";
  item.datasetID = "USA_ESRI_2013";

  //push the infographic into the array and set options
  items.push(item);
  infographics.set("options", options);
  infographics.startup();
});

toJson()

Converts object to its JSON representation.
Return type: Object
Show Modal