Skip to content

GridAggregationFunctionDataSource API

Extended documentation for the GridAggregationFunctionDataSource interface with detailed information on the module's properties and available APIs.

Demos

Import

import { GridAggregationFunctionDataSource } from '@mui/x-data-grid-premium';


Grid aggregation function data source definition interface.

Properties

Optional

Indicates if the aggregation function depends on rows being in a sorted order. If `true`, the values provided to `apply` will be sorted.

Type:boolean

Default:false


Optional

Column types supported by this aggregation function. If not defined, all types are supported (in most cases this property should be defined).

Type:string[]


Optional

Indicates if the aggregated value has the same unit as the cells used to generate it. It can be used to apply a custom cell renderer only if the aggregated value has the same unit.

Type:boolean

Default:true


Optional

Label of the aggregation function. Used for adding a label to the footer of the grouping column when this aggregation function is the only one being used.

Type:string

Default:apiRef.current.getLocaleText('aggregationFunctionLabel{capitalize(name)})


Optional

Function for applying a formatter to the aggregated value. If not defined, the grid uses the formatter of the column.

Type:(value: never, row: GridValidRowModel, column: GridActionsColDef<GridValidRowModel, any, any> | GridBaseColDef<GridValidRowModel, any, any> | GridSingleSelectColDef<GridValidRowModel, any, any>, apiRef: RefObject<GridApiCommunity>) => any