Module

x/vega_lite/examples/specs/trellis_bar.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 trellis bar chart showing the US population distribution of age groups and gender in 2000.", "data": { "url": "data/population.json"}, "transform": [ {"filter": "datum.year == 2000"}, {"calculate": "datum.sex == 2 ? 'Female' : 'Male'", "as": "gender"} ], "width": {"step": 17}, "mark": "bar", "encoding": { "row": {"field": "gender"}, "y": { "aggregate": "sum", "field": "people", "title": "population" }, "x": {"field": "age"}, "color": { "field": "gender", "scale": {"range": ["#675193", "#ca8861"]} } }}