Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 61 additions & 8 deletions docs/canvas/canvas-function-reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A *** denotes a required argument.

A † denotes an argument can be passed multiple times.

<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | V | W | X | Y | Z
<<a_fns>> | B | <<c_fns>> | <<d_fns>> | <<e_fns>> | <<f_fns>> | <<g_fns>> | <<h_fns>> | <<i_fns>> | <<j_fns>> | K | <<l_fns>> | <<m_fns>> | <<n_fns>> | O | <<p_fns>> | Q | <<r_fns>> | <<s_fns>> | <<t_fns>> | <<u_fns>> | <<v_fns>> | W | X | Y | Z

[float]
[[a_fns]]
Expand Down Expand Up @@ -897,7 +897,7 @@ Default: `"-_index:.kibana"`
|`string`
|An index or index pattern. For example, `"logstash-*"`.

Default: `_all`
Default: `"_all"`
|===

*Returns:* `number`
Expand Down Expand Up @@ -965,7 +965,7 @@ Default: `1000`
|`string`
|An index or index pattern. For example, `"logstash-*"`.

Default: `_all`
Default: `"_all"`

|`metaFields`
|`string`
Expand Down Expand Up @@ -1026,7 +1026,7 @@ Alias: `tz`
|`string`
|The timezone to use for date operations. Valid ISO8601 formats and UTC offsets both work.

Default: `UTC`
Default: `"UTC"`
|===

*Returns:* `datatable`
Expand Down Expand Up @@ -1238,7 +1238,7 @@ filters
|`string`
|The horizontal text alignment.

Default: `left`
Default: `"left"`

|`color`
|`string`
Expand Down Expand Up @@ -1280,7 +1280,7 @@ Default: `false`
|`string`
|The font weight. For example, `"normal"`, `"bold"`, `"bolder"`, `"lighter"`, `"100"`, `"200"`, `"300"`, `"400"`, `"500"`, `"600"`, `"700"`, `"800"`, or `"900"`.

Default: `normal`
Default: `"normal"`
|===

*Returns:* `style`
Expand Down Expand Up @@ -2469,7 +2469,7 @@ Alias: `shape`
|`string`
|Pick a shape.

Default: `square`
Default: `"square"`

|`border`

Expand Down Expand Up @@ -2732,7 +2732,7 @@ Aliases: `c`, `field`
|`string`
|The column or field that you want to filter.

Default: `@timestamp`
Default: `"@timestamp"`

|`compact`
|`boolean`
Expand Down Expand Up @@ -2871,3 +2871,56 @@ Default: `""`
|===

*Returns:* `string`

[float]
[[v_fns]]
== V

[float]
[[var_fn]]
=== `var`

Updates the Kibana global context.

*Accepts:* `any`

[cols="3*^<"]
|===
|Argument |Type |Description

|_Unnamed_ ***

Alias: `name`
|`string`
|Specify the name of the variable.
|===

*Returns:* Depends on your input and arguments


[float]
[[var_set_fn]]
=== `var_set`

Updates the Kibana global context.

*Accepts:* `any`

[cols="3*^<"]
|===
|Argument |Type |Description

|_Unnamed_ ***

Alias: `name`
|`string`
|Specify the name of the variable.

|`value`

Alias: `val`
|`any`
|Specify the value for the variable. When unspecified, the input context is used.
|===

*Returns:* Depends on your input and arguments
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export type ExpressionFunctionVar = ExpressionFunctionDefinition<
export const variable: ExpressionFunctionVar = {
name: 'var',
help: i18n.translate('expressions.functions.var.help', {
defaultMessage: 'Updates kibana global context',
defaultMessage: 'Updates the Kibana global context.',
}),
args: {
name: {
types: ['string'],
aliases: ['_'],
required: true,
help: i18n.translate('expressions.functions.var.name.help', {
defaultMessage: 'Specify name of the variable',
defaultMessage: 'Specify the name of the variable.',
}),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ export type ExpressionFunctionVarSet = ExpressionFunctionDefinition<
export const variableSet: ExpressionFunctionVarSet = {
name: 'var_set',
help: i18n.translate('expressions.functions.varset.help', {
defaultMessage: 'Updates kibana global context',
defaultMessage: 'Updates the Kibana global context.',
}),
args: {
name: {
types: ['string'],
aliases: ['_'],
required: true,
help: i18n.translate('expressions.functions.varset.name.help', {
defaultMessage: 'Specify name of the variable',
defaultMessage: 'Specify the name of the variable.',
}),
},
value: {
aliases: ['val'],
help: i18n.translate('expressions.functions.varset.val.help', {
defaultMessage:
'Specify value for the variable. If not provided input context will be used',
'Specify the value for the variable. When unspecified, the input context is used.',
}),
},
},
Expand Down