Cell Summary

The Cell Summary Module allows you to see - at a glance - summary information about the cells (and rows) you have selected in AdapTable.

Simply select a group of cells and you can see the summary information about those cells in the Cell Summary Toolbar and / or Tool Panel

AdapTable Cell Summary Operations

AdapTable ships with a large set of common Summary Operations.

note

If you have installed the Finance Plugin then extra finance-related Operations are available.

tip

You can provide your own Summary Operations in General Options

OperationColumnsDescription
SumNumericTotal of all selected cells
AverageNumericAverage of all selected cells
MedianNumericMiddle (value) of all selected cells (when ordered)
ModeNumericMost common value
DistinctAllCount of distinct selected cell values
MaxNumericHighest selected Cell Value
MinNumericLowest selected Cell Value
CountAllNumber of selected cells

If using the Finance Plugin the additional Cell Summary Operations are available:

OperationColumnsDescription
OnlyNumericReturns true if all selected cells match (single column only)
WeightedAverageNumericCalculates the Weighted Average (is using a Weighted Average Column)

Custom Cell Summary Operations

Developers can provide custom Cell Summary Operations at design-time via the cellSummaryOperations property in General Options.

The CellSummaryOperation is defined as follows:

PropertyDescription
operationFunctionFunction to run when summary result is required
operationNameName of the Operation - will be displayed in the Cell Summary dropdowns.
// Create a Custom Cell Summary definition called 'Oldest'
// which will reutrn the oldest date in a selection of date cells
const adaptableOptions: AdaptableOptions = {
generalOptions: {
cellSummaryOperations: [
{
operationName: 'Five Biggest',
operationFunction: (operationParam) => {
if (operationParam.numericValues.length >= 5) {
return Helper.sumNumberArray(
operationParam.numericValues.sort((a, b) => b - a).slice(0, 5)
);
}
},
},
],
},
};

UI Elements

Cell Summary includes the following UI Elements:

  • Popup - Shows all the Cell Summary Operation results for the selected cells

  • Toolbar - Displays the result of the curently selected Cell Summary Operation (available through a dropdown). Choose a different item in the dropdown to see a different operation, or click on the 'info' button to see all the Operations.

  • Tool Panel - Same as Toolbar above.

  • Context Menu - See Cell Summary Menu Item opens Cell Summary popup (only visible if selected cells are editable).

Entitlements

Cell Summary Entitlement Rules:

  • Full: All Cell Summary Operations will be displayed (and can be selected)

  • Hidden: All Cell Summaries are hidden from the User

  • ReadOnly: N/A

FAQ

Can we add our own Summary Operations?

Yes, you can provide them in cellSummaryOperationDefinitions property of General Options

Can we see Financial Operations?

Yes, if you use the AdapTable Finance Plugin

More Information