mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Feature/mathandreduce (#41608)
* Added new math functions: round, ceil, floor * Added a new reduce function: last.
This commit is contained in:
@@ -12,7 +12,7 @@ interface Props {
|
||||
const mathPlaceholder =
|
||||
'Math operations on one more queries, you reference the query by ${refId} ie. $A, $B, $C etc\n' +
|
||||
'Example: $A + $B\n' +
|
||||
'Available functions: abs(), log(), is_number(), is_inf(), is_nan(), is_null()';
|
||||
'Available functions: abs(), log(), is_number(), round(), ceil(), floor(), is_inf(), is_nan(), is_null(), ';
|
||||
|
||||
export const Math: FC<Props> = ({ labelWidth, onChange, query }) => {
|
||||
const onExpressionChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
|
||||
|
||||
@@ -21,6 +21,7 @@ export const reducerTypes: Array<SelectableValue<string>> = [
|
||||
{ value: ReducerID.mean, label: 'Mean', description: 'Get the average value' },
|
||||
{ value: ReducerID.sum, label: 'Sum', description: 'Get the sum of all values' },
|
||||
{ value: ReducerID.count, label: 'Count', description: 'Get the number of values' },
|
||||
{ value: ReducerID.last, label: 'Last', description: 'Get the last value' },
|
||||
];
|
||||
|
||||
export const downsamplingTypes: Array<SelectableValue<string>> = [
|
||||
|
||||
Reference in New Issue
Block a user