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

Description

(Added at v3.24)
The ReportPlayer widget runs infographic report templates for a provided analysis area. It works with the standard provided Esri infographic report templates or custom created infographic report templates. Infographics can be viewed in full page mode or as slides. Once the infographic report is generated it can be exported to a PDF, image, or dynamic HTML.

Samples

Search for samples that use this class.

Constructors

NameSummary
new esri.dijit.geoenrichment.ReportPlayer.ReportPlayer(params, srcNode?)Creates a new ReportPlayer dijit using the given DOM node.

Properties

NameTypeSummary
dataProviderDataProviderGEData Provider for the ReportPlayer which allows you to specify which export options are available when running the report.
isSlidesViewBooleanIndicate whether to display the report in slide view or full screen, defaults to false which is full view.
resizeModesPlayerResizeModesSpecifies the resize mode of the ReportPlayer.
themePlayerThemesSpecifies the theme of the ReportPlayer.

Methods

NameReturn typeSummary
playReport(dataProviderParams, playParams?)DeferredGenerates the report for the supplied parameters.
Constructor Details

new esri.dijit.geoenrichment.ReportPlayer.ReportPlayer(params, srcNode?)

Creates a new ReportPlayer dijit using the given DOM node.
Parameters:
<Object> params Required Various parameters that can be used to configure the ReportPlayer. All properties can be passed into the constructor as options.
<Node | String> srcNode Optional Reference or id of the HTML element where the widget should be rendered.
params properties:
<DataProviderGE> dataProvider Optional Specifies which export options are available for the report.
<Boolean> isSlidesView Optional Indicate whether to display the report in slide view or full screen, defaults to false which is full view.
<PlayerResizeModes> resizeMode Optional Specifies the resize mode of the ReportPlayer. It defaults to AUTO.
<PlayerThemes> theme Optional Specifies the theme of the ReportPlayer. It defaults to DARK.
Property Details

<DataProviderGE> dataProvider

Data Provider for the ReportPlayer which allows you to specify which export options are available when running the report.

<Boolean> isSlidesView

Indicate whether to display the report in slide view or full screen, defaults to false which is full view.
Default value: false

<PlayerResizeModes> resizeModes

Specifies the resize mode of the ReportPlayer.
Default value: AUTO

<PlayerThemes> theme

Specifies the theme of the ReportPlayer.
Default value: DARK
Method Details

playReport(dataProviderParams, playParams?)

Generates the report for the supplied parameters.
Return type: Deferred
Parameters:
<Object> dataProviderParams Required See the object specifications table below for the structure of the dataProviderParams object.
<Object> playParams Optional See the object specifications table below for the structure of the playParams object.
Object Specifications:
<analysisJson>
<String> address Optional Address of location, can be displayed in the generated infographic.
<String> description Optional A description for the location, can be displayed in the generated infographic.
<String> feature Required Feature of the generated infographic. Geometry is required. Attributes, symbol, and infoTemplate are optional. See sample below:

var analysisJson = [{
  "name": "Area name",
  "shortName": "Area name (short)",
  "description": "Area description",
  "address": "Area address",
  "latitude": "Area Lat.",
  "longitude": "Area Long.",
  "feature": {
    "geometry": {
      "rings": [
        [
          [-8238372.646123883, 4971599.356069453],
          [-8236117.753789412, 4970600.8973874515],
          [-8235730.791333708, 4968556.206880769],
          [-8240211.912117044, 4969607.216019718],
          [-8238372.646123883, 4971599.356069453]
        ]
      ],
      "spatialReference": {
        "wkid": 102100
      }
    },
    "attributes": {
      "ATTR_1": 1000.12345,
      "ATTR_2": 2000.12345,
      "ATTR_3": 3000.12345
    },
    "symbol": {
      "color": [
        64,
        128,
        194,
        50
      ],
      "outline": {
        "color": [
          64,
          128,
          194,
          255
        ],
        "width": 1.5,
        "type": "esriSLS",
        "style": "esriSLSSolid"
      },
      "type": "esriSFS",
      "style": "esriSFSSolid"
    },
    "infoTemplate": {
      "fieldInfos": [
        {
          "fieldName": "ATTR_1",
          "label": "Attribute 1",
          "format": { places: 1 },
          "visible": true
        },
        {
          "fieldName": "ATTR_2",
          "label": "Attribute 2",
          "format": { places: 2 },
          "visible": true
        },
        {
          "fieldName": "ATTR_3",
          "label": "Attribute 3",
          "format": { places: 3 },
          "visible": true
        }
      ]
    }
  }
}];
<String> latitude Optional Latitude of location, can be displayed in the generated infographic.
<String> longitude Optional Longitude of location, can be displayed in the generated infographic.
<String> name Optional The name of the location, this is often displayed in the generated infographic.
<String> shortName Optional A short name for the location, can be displayed in the generated infographic.
<dataProviderParams>
<Polygon> analysisAreas Required An array of analysisJson objects which detail the location that the infographic will run on. See below for additional information regarding the analysisJson object.
<String> countryID Required Two-digit country code. For example: "US".
<String> geoenrichmentUrl Optional The URL of the Geoenrichment service. If not specified, it will be discovered via the portal helper services.
<String> portalUrl Required URL of the ArcGIS Portal instance. For example, "https://www.arcgis.com".
<String> reportID Required The ID of the report.
<playParams>
<object> analysisJson Required Details the location that an infographic is run on. See the object specifications table below for the structure of the analysisJson object.
<Boolean> disableAnimation Optional Indicates whether to disable the animation in the generated report. Defaults to false.
<String> reportID Required The ItemID of the Report Template to run. Can also use one of the following strings to run an Esri infographic in the United States.
  • at-risk-population-US
  • executive-summary-call-outs-US
  • demographic-summary-US
  • transportation-to-work-US
  • health-care-US
  • marketing-profile
  • portrait-property-flyer-US
  • skyscraper-US
  • key-facts-US
<Boolean> waitUntilAllContentIsReady Optional Set this value to true if required to know when the report has finished loading all of its content. The default value is false.
Show Modal