Skip to content

Instantly share code, notes, and snippets.

@ashleydavis
Created August 10, 2017 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashleydavis/3dbd3b83f2a67da8fe20ef444fd4958e to your computer and use it in GitHub Desktop.
Save ashleydavis/3dbd3b83f2a67da8fe20ef444fd4958e to your computer and use it in GitHub Desktop.
Example vega-lite chart with two time series and multiple layers.
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url": "https://vega.github.io/vega-lite/data/seattle-weather.csv"
},
"layer": [
{
"mark": "line",
"encoding": {
"x": {
"timeUnit": "month",
"field": "date",
"type": "temporal"
},
"y": {
"aggregate": "mean",
"field": "temp_min",
"type": "quantitative"
}
}
},
{
"mark": "line",
"encoding": {
"x": {
"timeUnit": "month",
"field": "date",
"type": "temporal"
},
"y": {
"aggregate": "mean",
"field": "temp_max",
"type": "quantitative"
}
}
}
]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment