StatDefinition / PartialStatDefinition

Description

A StatDefinition is a type that represents different kinds of aggregates.

Stat Definitions

At this time, the DataGrid supports the following stat definitions:

Example

Define a minimum aggregate for field "goals" when grouped on field "goals".

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.

Remarks

A partial type/interface is an object in which properties are optional.