You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/canvas/canvas-function-reference.asciidoc
+49-8Lines changed: 49 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Alias: `condition`
71
71
[[alterColumn_fn]]
72
72
=== `alterColumn`
73
73
74
-
Converts between core types, including `string`, `number`, `null`, `boolean`, and `date`, and renames columns. See also <<mapColumn_fn>> and <<staticColumn_fn>>.
74
+
Converts between core types, including `string`, `number`, `null`, `boolean`, and `date`, and renames columns. See also <<mapColumn_fn>>, <<mathColumn_fn>>, and <<staticColumn_fn>>.
75
75
76
76
*Expression syntax*
77
77
[source,js]
@@ -1717,23 +1717,23 @@ Adds a column calculated as the result of other columns. Changes are made only w
1717
1717
|===
1718
1718
|Argument |Type |Description
1719
1719
1720
+
|`id`
1721
+
1722
+
|`string`, `null`
1723
+
|An optional id of the resulting column. When no id is provided, the id will be looked up from the existing column by the provided name argument. If no column with this name exists yet, a new column with this name and an identical id will be added to the table.
1724
+
1720
1725
|_Unnamed_ ***
1721
1726
1722
1727
Aliases: `column`, `name`
1723
1728
|`string`
1724
-
|The name of the resulting column.
1729
+
|The name of the resulting column. Names are not required to be unique.
1725
1730
1726
1731
|`expression` ***
1727
1732
1728
1733
Aliases: `exp`, `fn`, `function`
1729
1734
|`boolean`, `number`, `string`, `null`
1730
1735
|A Canvas expression that is passed to each row as a single row `datatable`.
1731
1736
1732
-
|`id`
1733
-
1734
-
|`string`, `null`
1735
-
|An optional id of the resulting column. When not specified or `null` the name argument is used as id.
1736
-
1737
1737
|`copyMetaFrom`
1738
1738
1739
1739
|`string`, `null`
@@ -1808,6 +1808,47 @@ Default: `"throw"`
1808
1808
*Returns:* `number` | `boolean` | `null`
1809
1809
1810
1810
1811
+
[float]
1812
+
[[mathColumn_fn]]
1813
+
=== `mathColumn`
1814
+
1815
+
Adds a column by evaluating `TinyMath` on each row. This function is optimized for math, so it performs better than the <<mapColumn_fn>> with a <<math_fn>>.
1816
+
*Accepts:* `datatable`
1817
+
1818
+
[cols="3*^<"]
1819
+
|===
1820
+
|Argument |Type |Description
1821
+
1822
+
|id ***
1823
+
|`string`
1824
+
|id of the resulting column. Must be unique.
1825
+
1826
+
|name ***
1827
+
|`string`
1828
+
|The name of the resulting column. Names are not required to be unique.
1829
+
1830
+
|_Unnamed_
1831
+
1832
+
Alias: `expression`
1833
+
|`string`
1834
+
|A `TinyMath` expression evaluated on each row. See https://www.elastic.co/guide/en/kibana/current/canvas-tinymath-functions.html.
1835
+
1836
+
|`onError`
1837
+
1838
+
|`string`
1839
+
|In case the `TinyMath` evaluation fails or returns NaN, the return value is specified by onError. For example, `"null"`, `"zero"`, `"false"`, `"throw"`. When `"throw"`, it will throw an exception, terminating expression execution.
1840
+
1841
+
Default: `"throw"`
1842
+
1843
+
|`copyMetaFrom`
1844
+
1845
+
|`string`, `null`
1846
+
|If set, the meta object from the specified column id is copied over to the specified target column. Throws an exception if the column doesn't exist
1847
+
|===
1848
+
1849
+
*Returns:* `datatable`
1850
+
1851
+
1811
1852
[float]
1812
1853
[[metric_fn]]
1813
1854
=== `metric`
@@ -2581,7 +2622,7 @@ Default: `false`
2581
2622
[[staticColumn_fn]]
2582
2623
=== `staticColumn`
2583
2624
2584
-
Adds a column with the same static value in every row. See also <<alterColumn_fn>>and <<mapColumn_fn>>.
2625
+
Adds a column with the same static value in every row. See also <<alterColumn_fn>>, <<mapColumn_fn>>, and <<mathColumn_fn>>.
| [(constructor)(initializerContext)](./kibana-plugin-plugins-data-public.dataplugin._constructor_.md) | | Constructs a new instance of the <code>DataPublicPlugin</code> class |
Copy file name to clipboardExpand all lines: docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Constructs a new instance of the `AddPanelAction` class
Copy file name to clipboardExpand all lines: docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.addpanelaction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ export declare class AddPanelAction implements Action<ActionContext>
14
14
15
15
| Constructor | Modifiers | Description |
16
16
| --- | --- | --- |
17
-
| [(constructor)(getFactory, getAllFactories, overlays, notifications, SavedObjectFinder)](./kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md) | | Constructs a new instance of the <code>AddPanelAction</code> class |
17
+
| [(constructor)(getFactory, getAllFactories, overlays, notifications, SavedObjectFinder, reportUiCounter)](./kibana-plugin-plugins-embeddable-public.addpanelaction._constructor_.md) | | Constructs a new instance of the <code>AddPanelAction</code> class |
0 commit comments