Module

x/vega_lite/examples/specs/selection_project_single_cylinders_origin.vl.json

A concise grammar of interactive graphics, built on Vega.
Latest
File
{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "data": {"url": "data/cars.json"}, "selection": { "pts": { "type": "single", "fields": ["Cylinders", "Origin"] } }, "mark": "point", "encoding": { "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative"}, "color": { "condition": { "selection": "pts", "field": "Cylinders", "type": "ordinal", "scale": {"scheme": "yelloworangebrown"} }, "value": "grey" }, "shape": { "condition": { "selection": "pts", "field": "Origin", "type": "nominal", "scale": {"range": ["triangle-left", "triangle-right", "triangle-up"]} }, "value": "circle" }, "size": { "condition": {"selection": "pts", "value": 200}, "value": 50 } }}