AnyChart
API Reference
Still have questions?
Contact support
Top

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 is 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:

Name Type Description
name string Name of field.
uid string Unique identifier for field.

Returns:

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

Try it:

getFieldIndex

Returns field index by the field name.

Params:

Name Type Description
name string Field name.

Returns:

number - Returns negative field index.

Try it:

setCalculationFunction

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

Params:

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

Try it:

setContext

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

Params:

Name Type Description
value Object Context of the calculator

Try it:

setStartFunction

Sets function that will be executed on each calculation start.

Params:

Name Type Description
function function Function that looks like:
function(context){
   // this: context - The context value from anychart.data.TableComputer#setContext method
}

Try it: