diff --git a/build/vega-lite-schema.json b/build/vega-lite-schema.json index 9f04f10c9e..32ba92d003 100644 --- a/build/vega-lite-schema.json +++ b/build/vega-lite-schema.json @@ -976,7 +976,7 @@ "additionalProperties": false, "properties": { "argmax": { - "type": "string" + "$ref": "#/definitions/FieldName" } }, "required": [ @@ -988,7 +988,7 @@ "additionalProperties": false, "properties": { "argmin": { - "type": "string" + "$ref": "#/definitions/FieldName" } }, "required": [ diff --git a/src/aggregate.ts b/src/aggregate.ts index dd10cec54a..1e0c5f8502 100644 --- a/src/aggregate.ts +++ b/src/aggregate.ts @@ -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 = { @@ -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;