Skip to content

Commit 8575649

Browse files
committed
docs(example): add yearweek example
1 parent 9050e6b commit 8575649

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
3+
"width": 400,
4+
"height": 250,
5+
"transform": [{"filter": {"timeUnit": "year", "field": "Year", "range": [1970, 1971]}}],
6+
"data": {"url": "data/cars.json"},
7+
"mark": "bar",
8+
"encoding": {
9+
"x": {"timeUnit": "yearweek", "field": "Year", "type": "temporal"},
10+
"xOffset": {"field": "Origin"},
11+
"color": {"field": "Origin"},
12+
"y": {"aggregate": "count", "title": "Number of Cars"}
13+
}
14+
}

0 commit comments

Comments
 (0)