require(["esri/dijit/geoenrichment/InfographicsOptionsItem"], function(InfographicsOptionsItem) { /* code goes here */ });
Name | Summary |
---|---|
new InfographicsOptionsItem(type, variables) | Constructs an InfographicsOptionsItem object. |
esri/dijit/geoenrichment/InfographicsOptionsItem | Download source
Name | Type | Summary |
---|---|---|
datasetID | String | The ID of the dataset to which variables used in this Infographic belong. |
isVisible | Boolean | When true, the Infographic is configured to be visible. |
title | String | The title or name of the Infographic . |
type | String | The type of the Infographic . |
variables | String[] | 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. |
InfographicsOptionsItem
object.< > type |
Required | The type of the Infographic . Required when constructing an Infographic .
|
< > 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. |
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(); }); });
String
> datasetIDInfographic
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.
http://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer/Geoenrichment/Countries?f=pjson&token=<your_own_token>
.Boolean
> isVisibleInfographic
is configured to be visible.true | false
true
String
> titleInfographic
.String
> typeInfographic
. 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."Age Pyramid" | "RelatedVariables" | "Tapestry" | "OneVar"
String[]
> variablesInfographic
.
["<category_name>.*"]
.