Skip to content

Commit

Permalink
example specs for overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jun 23, 2016
1 parent 7da5591 commit 292bd6f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/specs/overlay_area_full.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv","format": {"type": "csv"}},
"transform": {"filter": "datum.symbol==='GOOG'"},
"layers": [
{
"mark": "area",
"encoding": {
"x": {"field": "date","type": "temporal"},
"y": {"field": "price","type": "quantitative"}
}
},
{
"mark": "line",
"encoding": {
"x": {"field": "date","type": "temporal"},
"y": {"field": "price","type": "quantitative"}
}
},
{
"mark": "point",
"encoding": {
"x": {"field": "date","type": "temporal"},
"y": {"field": "price","type": "quantitative"}
},
"config": {"mark": {"filled": true}}
}
]
}
11 changes: 11 additions & 0 deletions examples/specs/overlay_area_short.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv", "format": {"type": "csv"}},
"transform": {"filter": "datum.symbol==='GOOG'"},
"mark": "area",
"encoding": {
"x": {"field": "date", "type": "temporal"},
"y": {"field": "price", "type": "quantitative"}
},
"config": {"overlay": {"point": true, "line": true}}
}
25 changes: 25 additions & 0 deletions examples/specs/overlay_line_full.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"data": {"url": "data/stocks.csv","format": {"type": "csv"}},
"transform": {"filter": "datum.symbol==='GOOG'"},
"layers": [
{
"description": "Google's stock price over time.",
"mark": "line",
"encoding": {
"x": {"field": "date","type": "temporal"},
"y": {"field": "price","type": "quantitative"},
"color": {"field": "symbol", "type": "nominal"}
}
},
{
"description": "Google's stock price over time.",
"mark": "point",
"encoding": {
"x": {"field": "date","type": "temporal"},
"y": {"field": "price","type": "quantitative"},
"color": {"field": "symbol", "type": "nominal"}
},
"config": {"mark": {"filled": true}}
}
]
}
12 changes: 12 additions & 0 deletions examples/specs/overlay_line_short.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"description": "Google's stock price over time.",
"data": {"url": "data/stocks.csv", "format": {"type": "csv"}},
"transform": {"filter": "datum.symbol==='GOOG'"},
"mark": "line",
"encoding": {
"x": {"field": "date", "type": "temporal"},
"y": {"field": "price", "type": "quantitative"},
"color": {"field": "symbol", "type": "nominal"}
},
"config": {"overlay": {"point": true}}
}

0 comments on commit 292bd6f

Please sign in to comment.