StatKey

Description

A StatKey is an enum that represents the type of a StatDefinition.

Possible values

Name

Type

Value

Description

Average

string

"avg"

The StatDefinition used to calculate the average aggregate of a group of dataItems.

Count

string

"cnt"

The StatDefinition used to calculate the count aggregate of a group of dataItems.

Maximum

string

"max"

The StatDefinition used to calculate the maximum aggregate of a group of dataItems.

Median

string

"med"

The StatDefinition used to calculate the median aggregate of a group of dataItems.

Minimum

string

"min"

The StatDefinition used to calculate the minimum aggregate of a group of dataItems.

StandardDeviation

string

"std"

The StatDefinition used to calculate the standard deviation aggregate of a group of dataItems.

Sum

string

"sum"

The StatDefinition used to calculate the sum aggregate of a group of dataItems.

Variance

string

"var"

The StatDefinition used to calculate the variance aggregate of a group of dataItems.

Example

Used as a type to identify the StatDefinition to use on a specific field.

const statDefinitions = {

  minGoalsStat: { type: "min", field: "goals" }

};



const groupConfigurations = {

  goals: {

    stats: [{ statDefinitionKey: "minGoalsStat" }]

  }

};



const options = { experimental: { statDefinitions }, groupConfigurations };

const datagrid = new Xceed.DataGrid("containerId", options);

The "minGoalsStat" StatDefinition identifier must be used with the statDefinitionKey of a StatConfiguration in a GroupConfiguration to calculate the minimum stat of field "goals" for dataItems when grouped by "goals". The StatDefinitionCollection and GroupConfigurationCollection must be set in the DataGridOptions.