Skip to content

ColumnSummary

Options

columnSummary

Source code

columnSummary.columnSummary : Array<object> | function

The columnSummary option configures the ColumnSummary plugin.

You can set the columnSummary option to an array of objects. Each object configures a single column summary, using the following properties:

PropertyPossible valuesDescription
sourceColumnA numberColumn to summarize
rangesAn arrayRanges of rows to summarize
type'sum' | 'min' | 'max' | 'count' | 'average' | 'custom'Summary function
destinationRowA numberDestination cell’s row coordinate
destinationColumnA numberDestination cell’s column coordinate
forceNumerictrue | falseTreat non-numerics as numerics
reversedRowCoordstrue | falseReverse row coordinates
suppressDataTypeErrorstrue | falseSuppress data type errors
readOnlytrue | falseMake summary cell read-only
roundFloattrue | false | A numberRound summary result
customFunctionA functionCustom summary function

Read more:

This option can only be set at the grid level. It has no effect when set in the columns, cells, or cell options.

Default: undefined
Example

columnSummary: [
{
sourceColumn: 0,