Class: ColumnSummary

ColumnSummary

handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 15

Allows making pre-defined calculations on the cell values and display the results within Handsontable.
See the demo for more information.

Members

endpointsnull Endpoints

The Endpoints class instance. Used to make all endpoint-related operations.

Methods

handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 78

calculate(endpoint)

Do the math for a single endpoint.

Parameters:
Name Type Description
endpoint Object

Contains information about the endpoint.

handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 272

calculateAverage(endpoint){Number}

Calculate the average value from the cells in the range.

Parameters:
Name Type Description
endpoint Object

Contains the endpoint information.

Returns: {Number} Avarage value.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 154

calculateMinMax(endpoint, type){Number}

Calculate the minimal value for the selected ranges

Parameters:
Name Type Description
endpoint Object

Contains the endpoint information.

type String

'min' or 'max'.

Returns: {Number} Min or Max value.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 107

calculateSum(endpoint){Number}

Calculate sum of the values contained in ranges provided in the plugin config.

Parameters:
Name Type Description
endpoint Object

Contains the endpoint information.

Returns: {Number} Sum for the selected range
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 225

countEmpty(rowRange, col){Number}

Count empty cells in the provided row range.

Parameters:
Name Type Description
rowRange Array

Row range for the calculation.

col Number

Column index.

Returns: {Number} Empty cells count.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 249

countEntries(endpoint){Number}

Count non-empty cells in the provided row range.

Parameters:
Name Type Description
endpoint Object

Contains the endpoint information.

Returns: {Number} Entry count.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 67

disablePlugin()

Disable the plugin.

handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 38

enablePlugin()

Enable plugin for this Handsontable instance.

handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 286

getCellValue(row, col){String}

Gets a cell value, taking into consideration a basic validation.

Parameters:
Name Type Description
row Number

Row index.

col Number

Column index.

Returns: {String} The cell value.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 190

getPartialMinMax(rowRange, col, type){Number}

Get a local minimum of the provided sub-range

Parameters:
Name Type Description
rowRange Array

Range for the calculation.

col Number

Column index.

type String

'min' or 'max'

Returns: {Number} Min or max value.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 126

getPartialSum(rowRange, col){Number}

Get partial sum of values from a single row range

Parameters:
Name Type Description
rowRange Array

Range for the sum.

col Number

Column index.

Returns: {Number} The partial sum.
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 31

isEnabled(){Boolean}

Check if plugin is enabled.

Returns: {Boolean}
handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 353

onAfterRowMove(rows, target)

afterRowMove hook callback.

Parameters:
Name Type Description
rows Array

Array of logical rows that were moved.

target Number

Index of the destination row.

handsontable-pro/src/plugins/columnSummary/columnSummary.js, line 343

onBeforeRowMove(rows, target)

beforeRowMove hook callback.

Parameters:
Name Type Description
rows Array

Array of logical rows to be moved.

target Number

Index of the destination row.