-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Travis] Update examples (build: 24136)
- Loading branch information
Travis CI
committed
Jun 30, 2019
1 parent
6f4bd2b
commit f436169
Showing
14 changed files
with
307 additions
and
26 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega/v5.json", | ||
"autosize": "pad", | ||
"padding": 5, | ||
"width": 200, | ||
"height": 15, | ||
"style": "cell", | ||
"data": [ | ||
{ | ||
"name": "source_0", | ||
"url": "data/population.json", | ||
"format": {"type": "json"}, | ||
"transform": [ | ||
{"type": "filter", "expr": "datum.year == 2000"}, | ||
{ | ||
"type": "aggregate", | ||
"groupby": [], | ||
"ops": ["sum"], | ||
"fields": ["people"], | ||
"as": ["sum_people"] | ||
} | ||
] | ||
} | ||
], | ||
"signals": [{"name": "height", "update": "height"}], | ||
"marks": [ | ||
{ | ||
"name": "marks", | ||
"type": "rect", | ||
"style": ["bar"], | ||
"from": {"data": "source_0"}, | ||
"encode": { | ||
"update": { | ||
"fill": {"value": "#4c78a8"}, | ||
"x": {"scale": "x", "field": "sum_people"}, | ||
"x2": {"scale": "x", "value": 0}, | ||
"yc": {"signal": "height", "mult": 0.5}, | ||
"height": {"value": 13} | ||
} | ||
} | ||
} | ||
], | ||
"scales": [ | ||
{ | ||
"name": "x", | ||
"type": "linear", | ||
"domain": {"data": "source_0", "field": "sum_people"}, | ||
"range": [0, {"signal": "width"}], | ||
"nice": true, | ||
"zero": true | ||
} | ||
], | ||
"axes": [ | ||
{ | ||
"scale": "x", | ||
"orient": "bottom", | ||
"grid": false, | ||
"title": "population", | ||
"labelFlush": true, | ||
"labelOverlap": true, | ||
"tickCount": {"signal": "ceil(width/40)"}, | ||
"zindex": 1 | ||
}, | ||
{ | ||
"scale": "x", | ||
"orient": "bottom", | ||
"grid": true, | ||
"tickCount": {"signal": "ceil(width/40)"}, | ||
"domain": false, | ||
"labels": false, | ||
"maxExtent": 0, | ||
"minExtent": 0, | ||
"ticks": false, | ||
"zindex": 0 | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega/v5.json", | ||
"autosize": "pad", | ||
"padding": 5, | ||
"height": 200, | ||
"style": "cell", | ||
"data": [ | ||
{ | ||
"name": "source_0", | ||
"url": "data/cars.json", | ||
"format": {"type": "json"}, | ||
"transform": [ | ||
{ | ||
"type": "aggregate", | ||
"groupby": ["Origin"], | ||
"ops": ["count"], | ||
"fields": [null], | ||
"as": ["__count"] | ||
} | ||
] | ||
} | ||
], | ||
"signals": [ | ||
{"name": "x_step", "value": 20}, | ||
{ | ||
"name": "width", | ||
"update": "bandspace(domain('x').length, 0.1, 0.05) * x_step" | ||
} | ||
], | ||
"marks": [ | ||
{ | ||
"name": "marks", | ||
"type": "rect", | ||
"style": ["bar"], | ||
"from": {"data": "source_0"}, | ||
"encode": { | ||
"update": { | ||
"fill": {"value": "#4c78a8"}, | ||
"x": {"scale": "x", "field": "Origin"}, | ||
"width": {"scale": "x", "band": true}, | ||
"y": {"scale": "y", "field": "__count"}, | ||
"y2": {"scale": "y", "value": 0} | ||
} | ||
} | ||
} | ||
], | ||
"scales": [ | ||
{ | ||
"name": "x", | ||
"type": "band", | ||
"domain": {"data": "source_0", "field": "Origin", "sort": true}, | ||
"range": {"step": {"signal": "x_step"}}, | ||
"paddingInner": 0.1, | ||
"paddingOuter": 0.05 | ||
}, | ||
{ | ||
"name": "y", | ||
"type": "linear", | ||
"domain": {"data": "source_0", "field": "__count"}, | ||
"range": [{"signal": "height"}, 0], | ||
"nice": true, | ||
"zero": true | ||
} | ||
], | ||
"axes": [ | ||
{ | ||
"scale": "x", | ||
"orient": "bottom", | ||
"grid": false, | ||
"title": "Origin", | ||
"labelAlign": "right", | ||
"labelAngle": 270, | ||
"labelBaseline": "middle", | ||
"zindex": 1 | ||
}, | ||
{ | ||
"scale": "y", | ||
"orient": "left", | ||
"grid": false, | ||
"title": "Count of Records", | ||
"labelOverlap": true, | ||
"tickCount": {"signal": "ceil(height/40)"}, | ||
"zindex": 1 | ||
}, | ||
{ | ||
"scale": "y", | ||
"orient": "left", | ||
"gridScale": "x", | ||
"grid": true, | ||
"tickCount": {"signal": "ceil(height/40)"}, | ||
"domain": false, | ||
"labels": false, | ||
"maxExtent": 0, | ||
"minExtent": 0, | ||
"ticks": false, | ||
"zindex": 0 | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.