AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.

class anychart.data.TableComputer Improve this Doc

Stock table computer constructor.

Methods Overview

Data
addOutputField()Adds output field to the computer with the given name.
getFieldIndex()Returns field index by the field name.
setCalculationFunction()Sets function that will be executed for each row of the table storage.
setContext()Sets computer context. If not set - defaults to Window.
setStartFunction()Sets function that will be executed on each calculation start.

Methods Description

addOutputField

Adds output field to the computer with the given name.

Params:

NameTypeDescription
namestringName of field.
uidstringUnique identifier for field.

Returns:

number - Returns negative number of column. This number of column can use for data mapping.

getFieldIndex

Returns field index by the field name.

Params:

NameTypeDescription
namestringField name.

Returns:

number - Returns negative field index.

setCalculationFunction

Sets function that will be executed for each row of the table storage.

Params:

NameTypeDescription
valuefunctionFunction that looks like function(anychart.data.TableComputer.RowProxy, context){ // this: context - The context value from anychart.data.TableComputer#setContext method }.

setContext

Sets computer context. If not set - defaults to Window.

Params:

NameTypeDescription
valueObjectContext of the calculator

setStartFunction

Sets function that will be executed on each calculation start.

Params:

NameTypeDescription
functionfunctionFunction that looks like function(context){ // this: context - The context value from anychart.data.TableComputer#setContext method }.