Last active
April 1, 2020 08:57
-
-
Save keckelt/6a2af765b54f5c0ae5e74cc1ae2e3423 to your computer and use it in GitHub Desktop.
An area chart of three categorical attributes
This file contains hidden or 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/v4.json", | |
"data": {"url": "data/cars.json"}, | |
"mark": {"type": "square", "tooltip": true}, | |
"encoding": { | |
"y": { | |
"field": "Origin", | |
"type": "nominal", | |
"axis": null | |
}, | |
"x":{ | |
"field": "Cylinders", | |
"type": "nominal" | |
}, | |
"row": { | |
"field": "Horsepower", | |
"bin": { | |
"maxbins": 3 | |
}, | |
"type": "nominal" | |
}, | |
"color": { | |
"field": "Origin", | |
"type": "nominal" | |
}, | |
"size": { | |
"aggregate": "count", | |
"type": "quantitative", | |
"scale": {"type": "linear"} | |
} | |
} | |
} |
This file contains hidden or 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/v4.json", | |
"data": {"url": "data/cars.json"}, | |
"mark": {"type": "square", "tooltip": true}, | |
"encoding": { | |
"y": { | |
"field": "Origin", | |
"type": "nominal", | |
"axis": null | |
}, | |
"x":{ | |
"field": "Cylinders", | |
"type": "nominal" | |
}, | |
"row": { | |
"field": "Horsepower", | |
"bin": { | |
"maxbins": 2 | |
}, | |
"type": "nominal" | |
}, | |
"color": { | |
"field": "Origin", | |
"type": "nominal" | |
}, | |
"size": { | |
"aggregate": "count", | |
"type": "quantitative", | |
"scale": {"type": "linear"} | |
}, | |
"opacity": { | |
"value": 0.5, | |
"condition":{ "selection": "selected", "value": 1} | |
} | |
}, | |
"selection": { | |
"selected": { | |
"type": "multi", | |
"empty": "none" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment