Skip to content

Instantly share code, notes, and snippets.

@ggada
Last active May 21, 2018 04:06
Show Gist options
  • Save ggada/d38af0fb5be04955a5eec592ff4a1cbb to your computer and use it in GitHub Desktop.
Save ggada/d38af0fb5be04955a5eec592ff4a1cbb to your computer and use it in GitHub Desktop.
Vega time ticks precision
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"values": [
{
"date": "2018-05-01",
"value": 1
},
{
"date": "2018-05-02",
"value": 2
},
{
"date": "2018-05-03",
"value": 3
},
{
"date": "2018-05-04",
"value": 2
}
]
},
"layer": [
{
"mark": "line",
"encoding": {
"x": {
"field": "date",
"type": "temporal"
},
"y": {
"field": "value",
"type": "quantitative"
}
}
},
{
"data": {
"values": [
{
"date": "2018-05-03"
}
]
},
"mark": "rule",
"encoding": {
"x": {
"field": "date",
"type": "temporal",
"axis": {
"labelAngle": -90
}
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment