Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Oct 16, 2020
1 parent 61f6d47 commit 9dca454
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [ExpressionFunctionDefinitions](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.md) &gt; [cumulative\_sum](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.cumulative_sum.md)

## ExpressionFunctionDefinitions.cumulative\_sum property

<b>Signature:</b>

```typescript
cumulative_sum: ExpressionFunctionCumulativeSum;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface ExpressionFunctionDefinitions
| Property | Type | Description |
| --- | --- | --- |
| [clog](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.clog.md) | <code>ExpressionFunctionClog</code> | |
| [cumulative\_sum](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.cumulative_sum.md) | <code>ExpressionFunctionCumulativeSum</code> | |
| [font](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.font.md) | <code>ExpressionFunctionFont</code> | |
| [kibana\_context](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.kibana_context.md) | <code>ExpressionFunctionKibanaContext</code> | |
| [kibana](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.kibana.md) | <code>ExpressionFunctionKibana</code> | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [ExpressionFunctionDefinitions](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.md) &gt; [cumulative\_sum](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.cumulative_sum.md)

## ExpressionFunctionDefinitions.cumulative\_sum property

<b>Signature:</b>

```typescript
cumulative_sum: ExpressionFunctionCumulativeSum;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface ExpressionFunctionDefinitions
| Property | Type | Description |
| --- | --- | --- |
| [clog](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.clog.md) | <code>ExpressionFunctionClog</code> | |
| [cumulative\_sum](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.cumulative_sum.md) | <code>ExpressionFunctionCumulativeSum</code> | |
| [font](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.font.md) | <code>ExpressionFunctionFont</code> | |
| [kibana\_context](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.kibana_context.md) | <code>ExpressionFunctionKibanaContext</code> | |
| [kibana](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.kibana.md) | <code>ExpressionFunctionKibana</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function getBucketIdentifier(row: DatatableRow, groupColumns?: string[]) {
* Edge cases:
* * Will return the input table if `inputColumnId` does not exist
* * Will throw an error if `outputColumnId` exists already in provided data table
* * If `column` contains `null` or `undefined`, it will be ignored and overwritten with the cumulative sum of
* * If the row value contains `null` or `undefined`, it will be ignored and overwritten with the cumulative sum of
* all cells of the same series further up in the table.
* * For all values besides `null` and `undefined`, the value will be cast to a number before it's added to the
* cumulative sum of the current series - if this results in `NaN` (like in case of objects), all cells of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Datatable } from '../../../expression_types/specs/datatable';
describe('interpreter/functions#cumulative_sum', () => {
const fn = functionWrapper(cumulativeSum);
const runFn = (input: Datatable, args: CumulativeSumArgs) =>
fn(input, args, {} as ExecutionContext);
fn(input, args, {} as ExecutionContext) as Datatable;

it('calculates cumulative sum', () => {
const result = runFn(
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/expressions/common/expression_functions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
ExpressionFunctionVarSet,
ExpressionFunctionVar,
ExpressionFunctionTheme,
ExpressionFunctionCumulativeSum,
} from './specs';
import { ExpressionAstFunction } from '../ast';
import { PersistableStateDefinition } from '../../../kibana_utils/common';
Expand Down Expand Up @@ -131,4 +132,5 @@ export interface ExpressionFunctionDefinitions {
var_set: ExpressionFunctionVarSet;
var: ExpressionFunctionVar;
theme: ExpressionFunctionTheme;
cumulative_sum: ExpressionFunctionCumulativeSum;
}
4 changes: 4 additions & 0 deletions src/plugins/expressions/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ export interface ExpressionFunctionDefinitions {
//
// (undocumented)
clog: ExpressionFunctionClog;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionCumulativeSum" needs to be exported by the entry point index.d.ts
//
// (undocumented)
cumulative_sum: ExpressionFunctionCumulativeSum;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionFont" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/expressions/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ export interface ExpressionFunctionDefinitions {
//
// (undocumented)
clog: ExpressionFunctionClog;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionCumulativeSum" needs to be exported by the entry point index.d.ts
//
// (undocumented)
cumulative_sum: ExpressionFunctionCumulativeSum;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionFont" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down

0 comments on commit 9dca454

Please sign in to comment.