Created
September 10, 2024 11:30
-
-
Save declann/f03a16dafe39f5a36ed4b5b6f1a5c7c4 to your computer and use it in GitHub Desktop.
Vega-Lite spec from Tue Sep 10 2024
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/v5.json", | |
"description": "Google's stock price over time.", | |
"data": {"url": "data/stocks.csv"}, | |
"transform": [{"filter": "datum.symbol==='GOOG'"}], | |
"mark": { | |
"type": "area", | |
"line": {"color": "darkgreen"}, | |
"fill": { | |
"x1": 0.1, | |
"y1": 1, | |
"x2": 1, | |
"y2": 0, | |
"gradient": "linear", | |
"stops": [ | |
{"offset": 0, "color": "white"}, | |
{"offset": 0.1, "color": "darkgreen"}, | |
{"offset": 0.2, "color": "white"}, | |
{"offset": 0.3, "color": "darkgreen"}, | |
{"offset": 0.4, "color": "white"}, | |
{"offset": 0.5, "color": "darkgreen"}, | |
{"offset": 0.6, "color": "white"}, | |
{"offset": 0.7, "color": "darkgreen"}, | |
{"offset": 0.8, "color": "white"}, | |
{"offset": 0.9, "color": "darkgreen"} | |
] | |
} | |
}, | |
"encoding": { | |
"x": {"field": "date", "type": "temporal"}, | |
"y": {"field": "price", "type": "quantitative"} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment