Summarising Technical Reference

View as Markdown

Summary

  • Cell Summary Options and Cell Summary API — AdapTable Options and API for summarising selected cells (see Cell Summaries; requires AG Grid cell selection)
  • Row Summary definition — part of table layout Initial State for per-column aggregations in pinned rows (see Row Summaries)

Cell Summary Options

numericDisplayFormat is a NumberFormatterOptions:

NumberFormatterOptions

Formatter Options for Numeric Columns

Extends

BaseFormatterOptions

Abs?

boolean

Returns absolute value of cell value

Ceiling?

boolean

Returns smallest integer greater than cell value

Content?

string | number

Replaces cell value with supplied value (that can contain Template Literals)

Empty?

boolean

Show nothing in cell (but underlying value remains)

Floor?

boolean

Returns largest integer cell value

Number of digits to show in Fractions (up to 20)

Separator to use in fractions

Number of digits to show for Integers (up to 20)

Separator to use in Integers

Multiplier?

number

Multiplier to use on cell value

Notation?

'standard' | 'scientific'

Numeric notation to use when rendering the value - standard or scientific

Parentheses?

boolean

Shows negative numbers in parentheses

Prefix?

string

Prefix to use before cell value

Round?

boolean

Rounds cell value

Suffix?

string

Suffix to use after cell value

Truncate?

boolean

Truncates cell value

What to show when numeric value is zero (after multiplier & rounding)

Cell Summary Operation

operationFunction receives a CustomCellSummaryOperationContext:


Cell Summary API

CellSummaryApi

The summary calculated for the selected cells, such as sum or average, and the value it produces.

The result of a summary operation for the current selection.

Retrieves currently selected Cell Summary Operation

Retrieves the value of the current selected Cell Summary Operation

Retrieves all Custom Cell Summary Operations

Opens Cell Summary Settings Panel with

Selects which summary to show for the current cell selection.


Row Summary Definition

Row Summaries are provided as part of Layout Initial Adaptable State.

Each Row Summary is defined as follows:

RowSummary

A pinned row of column summaries in a table layout.

ColumnsMap is required: each key is a column id and each value is a summary name such as 'SUM' or 'AVG'. Position is 'Top' or 'Bottom'; omit it to pin the row to the bottom. IncludeOnlyFilteredRows defaults to true, so the summary uses the rows that pass the current filter. Suspend with IsSuspended. Requires AG Grid PinnedRowModule.

Row Summaries are not displayed while the Layout's GrandTotalRow is 'pinnedTop' or 'pinnedBottom', or when AG Grid enableRowPinning is set.

ColumnsMap

Record<string, SummarySupportedExpression>

Column id to summary name. Each value is a , for example 'SUM' or 'AVG'.

Evaluates only currently filtered rows in the summary

Default

true

'Top' pins the summary above the rows. 'Bottom' pins it below them. When omitted, the summary is pinned to the bottom.

IsReadOnly?

boolean

Sets Entity to ReadOnly (overwriting a Strategy Entitlement of 'Full')

IsSuspended?

boolean

Suspends (i.e. turns off) an Adaptable Object

Position is a RowSummaryPosition:

Value
'Top'
'Bottom'