Skip to content

Commit

Permalink
docs: clarify that argmin and argmax expect field names (#7200)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions Bot <[email protected]>
  • Loading branch information
domoritz and GitHub Actions Bot authored Jan 31, 2021
1 parent c3edb93 commit 5032a8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@
"additionalProperties": false,
"properties": {
"argmax": {
"type": "string"
"$ref": "#/definitions/FieldName"
}
},
"required": [
Expand All @@ -988,7 +988,7 @@
"additionalProperties": false,
"properties": {
"argmin": {
"type": "string"
"$ref": "#/definitions/FieldName"
}
},
"required": [
Expand Down
5 changes: 3 additions & 2 deletions src/aggregate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {AggregateOp} from 'vega';
import {isString, toSet} from 'vega-util';
import {FieldName} from './channeldef';
import {contains, Flag, keys} from './util';

const AGGREGATE_OP_INDEX: Flag<AggregateOp> = {
Expand Down Expand Up @@ -35,11 +36,11 @@ export const MULTIDOMAIN_SORT_OP_INDEX = {
};

export interface ArgminDef {
argmin: string;
argmin: FieldName;
}

export interface ArgmaxDef {
argmax: string;
argmax: FieldName;
}

export type NonArgAggregateOp = Exclude<AggregateOp, 'argmin' | 'argmax'>;
Expand Down

0 comments on commit 5032a8f

Please sign in to comment.