Module

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

A concise grammar of interactive graphics, built on Vega.
Latest
File
{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "description": "A scatterplot showing horsepower and miles per gallons for various cars.", "data": {"url": "data/cars.json"}, "layer": [{ "mark": "point", "encoding": { "x": {"field": "Horsepower", "type": "quantitative"}, "y": {"field": "Miles_per_Gallon", "type": "quantitative", "title": "Miles per Gallon"} } },{ "mark": "rule", "encoding": { "y": {"aggregate": "min", "field": "Miles_per_Gallon"} } },{ "mark": "rule", "encoding": { "y": {"aggregate": "max", "field": "Miles_per_Gallon"} } },{ "mark": "rect", "encoding": { "y": {"aggregate": "max", "field": "Miles_per_Gallon"}, "y2": {"aggregate": "min", "field": "Miles_per_Gallon"}, "opacity": {"value": 0.2} } }]}