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

require(["esri/dijit/geoenrichment/InfographicsOptionsItem"], function(InfographicsOptionsItem) { /* code goes here */ });

Description

(Added at v3.6)
Defines the options for each Infographic in an InfographicsCarousel.

Samples

Search for samples that use this class.

Constructors

NameSummary
new InfographicsOptionsItem(type, variables)Constructs an InfographicsOptionsItem object.

CSS

esri/dijit/geoenrichment/InfographicsOptionsItem | Download source

Properties

NameTypeSummary
datasetIDStringThe ID of the dataset to which variables used in this Infographic belong.
isVisibleBooleanWhen true, the Infographic is configured to be visible.
titleStringThe title or name of the Infographic.
typeStringThe type of the Infographic.
variablesString[]The set of variables displayed in this Infographic.

To return all variables in a category, specify this value as ["<category_name>.*"].

The availability of variables varies from country to country.
Constructor Details

new InfographicsOptionsItem(type, variables)

Constructs an InfographicsOptionsItem object.
Parameters:
<String> type Required The type of the Infographic. Required when constructing an Infographic.
  • "OneVar" displays the value of a variable. If multiple variables are specified, only the first in the array will be displayed.
  • "RelatedVariables" displays values of multiple variables.
  • "AgePyramid" displays an age pyramid based on the demographic data. Must specify variables: ["Age.*"] to get complete age data.
  • "Tapestry" displays Lifestyles-Esri Tapestry Segmentation data in the Infographic. Must specify variables: ["Tapestry.*"] to get complete tapestry data.
<String[]> variables Required The set of variables displayed in this InfographicsOptionsItem.

To return all variables in a category, specify this value as ["<category_name>.*"].

The availability of variables varies from country to country. You may use this application to find variables available in your study area, or refer to the Data collections section in the ArcGIS GeoEnrichment Service documentation to find available variables.
Sample:
require([
  "esri/dijit/geoenrichment/InfographicsCarousel",
  "esri/tasks/geoenrichment/GeometryStudyArea",
  "esri/geometry/Point",
  "esri/dijit/geoenrichment/InfographicsOptionsItem",
  ... 
], function(InfographicsCarousel, GeometryStudyArea, Point, InfographicsOptionsItem, ... ){
  var infographics = new InfographicsCarousel({
    studyArea: new GeometryStudyArea({ geometry: new Point(-120.44,34.95) }),
  }, "infographics");

  var options = new 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 InfographicsOptionsItem("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();
  });
});
Property Details

<String> datasetID

The ID of the dataset to which variables used in this Infographic belong. If not specified, the server will automatically determine the dataset. Specifying the dataset ID can eliminate computational cost and potentially improve the performance of your application.

Refer to the GeoEnrichment Coverage section of the ArcGIS GeoEnrichment Service documentation to find available dataset. Request latest available datasets at http://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer/Geoenrichment/Countries?f=pjson&token=<your_own_token>.

<Boolean> isVisible

When true, the Infographic is configured to be visible.
Known values: true | false
Default value: true

<String> title

The title or name of the Infographic.

<String> type

The type of the Infographic. Required when constructing an Infographic.
  • "OneVar" displays the value of a variable. If multiple variables are specified, only the first in the array will be displayed.
  • "RelatedVariables" displays values of multiple variables.
  • "AgePyramid" displays an age pyramid based on the demographic data. Must specify variables: ["Age.*"] to get complete age data.
  • "Tapestry" displays Lifestyles-Esri Tapestry Segmentation data in the Infographic. Must specify variables: ["Tapestry.*"] to get complete tapestry data.
Known values: "Age Pyramid" | "RelatedVariables" | "Tapestry" | "OneVar"

<String[]> variables

The set of variables displayed in this Infographic.

To return all variables in a category, specify this value as ["<category_name>.*"].

The availability of variables varies from country to country. You may use this application to find variables available in your study area, or refer to the Data collections section in the ArcGIS GeoEnrichment Service documentation to find available variables.
Show Modal