Last active
March 22, 2019 14:12
-
-
Save ashleydavis/af1958d3f22bd876959ebcc97105dd14 to your computer and use it in GitHub Desktop.
An example vega lite chart with two series that have two different scales. This shows a problem that the scales aren't independent.
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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
"layer": [ | |
{ | |
"data": { | |
"url": "https://vega.github.io/vega-lite/data/seattle-weather.csv" | |
}, | |
"mark": "line", | |
"encoding": { | |
"x": { | |
"field": "date", | |
"type": "temporal" | |
}, | |
"y": { | |
"field": "temp_min", | |
"type": "quantitative", | |
"axis": { | |
"orient": "left" | |
} | |
} | |
} | |
}, | |
{ | |
"data": { | |
"url": "data/stocks.csv" | |
}, | |
"transform": [{"filter": "datum.symbol==='GOOG'"}], | |
"mark": "line", | |
"encoding": { | |
"x": { | |
"field": "date", | |
"type": "temporal" | |
}, | |
"y": { | |
"field": "price", | |
"type": "quantitative", | |
"axis": { | |
"orient": "right" | |
} | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment