Skip to content

Commit

Permalink
Improve comment for aggregate and revise some docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Jul 6, 2017
1 parent 7edfe5b commit dff3386
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4907,7 +4907,7 @@
"properties": {
"aggregate": {
"$ref": "#/definitions/AggregateOp",
"description": "The aggregation operations to apply to the fields, such as sum, average or count. See the aggregate operation reference for more."
"description": "The aggregation operations to apply to the fields, such as sum, average or count.\nSee the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#supported-aggregation-operations)\nfor more information."
},
"as": {
"description": "The output field names to use for each aggregated field.",
Expand Down Expand Up @@ -4936,7 +4936,7 @@
"type": "array"
},
"summarize": {
"description": "Array of objects that contains aggregate information for the transform.",
"description": "Array of objects that define aggregate fields.",
"items": {
"$ref": "#/definitions/Summarize"
},
Expand Down
2 changes: 1 addition & 1 deletion site/docs/legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Besides `legend` property of each encoding channel, the configuration object ([`

## Legend Properties

To customize legend, a `legend` object in [an encoding channel's definition](encoding.html) can contain the following groups of properties:
To customize legends, a `legend` object in [an encoding channel's definition](encoding.html) can contain the following groups of properties:



Expand Down
2 changes: 1 addition & 1 deletion site/docs/transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ A DateTime object must have at least one of the following properties:
...
"transform": [
{
"summarize": {"aggregate": ..., "field": ..., "as": ...,
"summarize": [{"aggregate": ..., "field": ..., "as": ...}],
"groupby": [...]
} // Summarize Transform
...
Expand Down
4 changes: 2 additions & 2 deletions site/usage/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ If you want access to the compiled Vega spec from a Javascript program, you can
var vgSpec = vl.compile(vlSpec).spec;
```

You could also pass in a customize logger as an optional parameter, which allow you configure your output messages.
By default, warnings and errors are printed to the JavaScript console. To customize how errors and warnings are handled, you can pass a customize logger to the compile function.

```js
var vgSpec = vl.compile(vlSpec, logger).spec;
```

A custom logger implementation should implement the following interface:
A custom logger should implement the following interface:

```typescript
interface LoggerInterface {
Expand Down
6 changes: 4 additions & 2 deletions src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface TimeUnitTransform {

export interface SummarizeTransform {
/**
* Array of objects that contains aggregate information for the transform.
* Array of objects that define aggregate fields.
*/
summarize: Summarize[];

Expand All @@ -78,7 +78,9 @@ export interface SummarizeTransform {

export interface Summarize {
/**
* The aggregation operations to apply to the fields, such as sum, average or count. See the aggregate operation reference for more.
* The aggregation operations to apply to the fields, such as sum, average or count.
* See the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#supported-aggregation-operations)
* for more information.
*/
aggregate: AggregateOp;

Expand Down

0 comments on commit dff3386

Please sign in to comment.