eval (Execute calculation expression)

$eval can be used to execute a calculation expression at runtime.
The expression is determined and calculated at runtime. This function is only needed to execute an expression which can be read from another place and cannot be formulated statically.

Syntax

$eval(expression[,host])

Parameter

Name

Description

expression

The expression to be calculated as text, e.g. $el(3) or \{data field\}.

host

Optional, the object to be used for the calculation expression.

If the host parameter is not specified, $input is used.

Return value

The result of the expression

Example

Syntax

Host object

Result

$eval({colorExpression})

{
"colorExpression": "$getStyleVar(#FE6601)"
}

#FE6601