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

require(["esri/tasks/datareviewer/DashboardResult"], function(DashboardResult) { /* code goes here */ });

Description

(Added at v3.14)
Encapsulates data describing a Dashboard Result. This includes arrays that contain unique field values, counts of those field values, and ReviewerFilters.

Instances of this class are returned in the deferred object of the getDashboardResults operation and in the DashboardTask's onGetDashboardResultsComplete event.

Samples

Search for samples that use this class.

Properties

NameTypeSummary
countsArrayArray of reviewer result field value counts.
fieldNameStringName of the reviewer results field.
fieldValuesArrayArray of reviewer results field values.
filtersReviewerFiltersAn instance of ReviewerFilters class.

Methods

NameReturn typeSummary
getCount(fieldValue)NumberGets the result count for a field value.
Property Details

<Array> counts

Array of reviewer result field value counts. Counts are a summary of unique field values in a field.

<String> fieldName

Name of the reviewer results field. This is the field name used in the getDashboardResults function of the DashboardTask class.

<Array> fieldValues

Array of reviewer results field values.

<ReviewerFilters> filters

An instance of ReviewerFilters class. Filters limit or precisely define which dashboard results to generate. You can apply multiple filters to a single request.
Method Details

getCount(fieldValue)

Gets the result count for a field value.
Return type: Number
Parameters:
<String | Number> fieldValue Required Unique field value from the fieldValues array.
Sample:
// Converts DashboardResults into an array of key-value pairs to use in a dojo chart.
var url="http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/";
var dashboardTask=new DashboardTask(url);
var deferred=dashboardTask.getDashboardResults("FEATUREOBJECTCLASS");

//Deferred callback and errback function
deferred.then(function(response)
{
  var mappedArray=[];
  array.forEach(response.dashboardResult.fieldValues, function (item,i)
  {
      mappedArray.push({
          text:"FEATUREOBJECTCLASS " + item,
          y:response.dashboardResult.getCount(item)});
  });
  // now use the mappedArray in the dojo chart addSeries function

}, function(error){
  Alert("Error ocurred: " + error.message);
});