Skip to content

Instantly share code, notes, and snippets.

@djbarnwal
Last active June 4, 2019 22:37
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 djbarnwal/43d77931b092dd500ec8f12afd928754 to your computer and use it in GitHub Desktop.
Save djbarnwal/43d77931b092dd500ec8f12afd928754 to your computer and use it in GitHub Desktop.
VL Test case
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "Drag the sliders to highlight points.",
"data": {"url": "data/cars.json"},
"selection": {"CylYr": {"type": "multi"}},
"mark": "circle",
"encoding": {
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"},
"color": {
"condition": {
"test": {
"and": [
{
"field": "Horsepower",
"gte": {
"selection": "CylYr",
"aggregate": "mean",
"field": "Horsepower"
}
},
{
"field": "Miles_per_Gallon",
"gte": {
"selection": "CylYr",
"aggregate": "mean",
"field": "Miles_per_Gallon"
}
}
]
},
"field": "Origin",
"type": "nominal"
},
"value": "grey"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment