Cell Summaries

Summary

  • AdapTable provides comprehensive summary information of selected cells in AG Grid
  • A table shows summaries of the cells using multiple operations
  • Developers can add their own custom summary operations which will also be evaluated

AdapTable provides useful summary information about the currently selected cells in AG Grid.

Caution

Cell Summaries are provided only for selected cells in a single numeric column

This summary information is displayable in 3 locations:

Each of these contains 3 UI elements:

  • DropDown to allow you to choose a Summary Operation (AdapTable stores the most recently selected)
  • Label showing the summarised value of the currently selected cells (using the Summary Operation)
  • Info button which opens a popup showing summaries for all the available Summary Operations

Cell Summary Types

There are 2 types of Cell Summaries that can be displayed:

  • System Summary Operations provided by AdapTable
  • Custom Summary Operations provided by developers

Adaptable Cell Summaries

AdapTable provides a number of system Summary Operations which are available by default in the Cell Summary UI.

Note

These are all Aggregation Scalar Functions provided by - and evaluated by - AdapTableQL

OperationDescription of Summarised Data
SumTotal of all selected cells
AverageAverage of all selected cells
MedianMiddle (value) of all selected cells (when ordered)
ModeMost common cell value
DistinctCount of distinct selected cell values
MaxHighest selected Cell Value
MinLowest selected Cell Value
CountNumber of selected cells
Weighted AvgWeighted Average
OnlyValue of all selected cells if they all match
Std DeviationShows Standard Deviation for selected cells

Note

The Weighted Average summary requires a defined Weighted Column, see Guide to Weighted Averages for more info

Cell Summary
Fork
  • This example selects some cells in the Github Stars column (using methods in AdapTable's Grid API)
  • It displays the Sum of their values in the Cell Summary Toolbar, Tool Panel and Status Bar
Try It Out
  • Select different cell ranges and different Summary Operations in the Cell Summary dashboard and see the results
  • Alternatively right-click and select Cell Summary to open a popup with different summary functions
  • Switch between the 2 Layouts and note that Cell Summaries are available in both Table and Pivot Layouts

Pivot Layouts

Cell Summaries are also available in Pivot Layouts.

Note

Cell Summaries will operate on selected cells in both Pivot Columns and Pivot Aggregation Columns

Summarising Pivot Cells
Fork
  • This example selects some cells in the pivoted MIT License / Github Stars column
  • Despite it being a automated pivot column, the sum of the selected cells appears in the Cell Summary Toolbar and Status Bar
Try It Out
  • Switch to the Pivot Agg Layout (which shows Pivot Aggregations but no Pivot Columns) and select some cells

Custom Cell Summaries

Developers can add their own custom summaries to provide bespoke information about selected cells.

Note

Custom Summaries will be added to the Summary Operations shipped by AdapTable and available for selection

This is done via the cellSummaryOperations property in Cell Summary Options.

cellSummaryOperations

Custom Cell Summary Operations

Each custom operation contains a summary function that will be invoked by AdapTable when it is required.

Custom Cell Summaries
Fork
  • This example contains a custom cell Summary called Most Stars
  • It returns the Name column value for the row in the selected cell range which has the highest Github Stars column value

Expand to see the Custom Cell Summaries

Try It Out
  • Select a few date cells in the Grid and then pick MIN from the Cell Summary dropdown

Formatting Cell Summaries

AdapTable will format Cell Summary values by evaluating the following list of rules (in the order given):

  • any Display Formats which have been provided for the Column (either by developers or end users)
  • a bespoke value supplied for the numericDisplayFormat property in Cell Summary Options
  • using the default format of 2 fraction digits

numericDisplayFormat

Format to use for Cell Summary values
Cell Summary Formatting
Fork
  • This example provides a custom Display Format for the Github Stars Column which is reflected in the Cell Summary (we select some cells using AdapTable's Grid API)
  • We also provide an implementation for numericDisplayFormat property in Cell Summary Options which is used when cells in other columns are selected
Try It Out
  • Select cells in the Github Watchers column and note that the numericDisplayFormat property's value is used

Ticking Cell Summaries

AdapTable will update Cell Summaries in real time as the selected cell values change.

Cell Summary Ticking Data
Fork
  • This example selects a group of cells in the Github Stars column and mimics ticking data by periodically updating the column
  • We see the Cell Summary update as the values in Selected Cells tick

Displaying Cell Summaries

(Recorded with AdapTable v14.0)

FAQ

Can we add our own Summary Operations? Yes, you can provide them in cellSummaryOperationDefinitions property of Cell Summary Options

Can we use Cell Summaries in Pivot Layouts? Yes, this was was introduced in Version 20 of AdapTable