Module

x/vega_lite/examples/specs/bar_aggregate_sort_mean.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 bar chart that sorts the y-values by the x-values.", "data": {"url": "data/population.json"}, "transform": [{"filter": "datum.year == 2000"}], "mark": "bar", "encoding": { "y": { "field": "age", "type": "ordinal", "sort": {"op": "sum", "field": "people"} }, "x": { "aggregate": "sum", "field": "people", "title": "population" } }}