Created
July 2, 2024 18:12
-
-
Save rajeshpv/815f4513ab334c064384fabb9f7c103c to your computer and use it in GitHub Desktop.
Vega-Lite spec from Tue Jul 02 2024
This file contains 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/v5.json", | |
"description": "A bar chart that sorts the y-values by the x-values.", | |
"data": {"url": "data/population.json"}, | |
"transform": [{"filter": "datum.year == 2000"}], | |
"height": {"step": 17}, | |
"mark": "bar", | |
"encoding": { | |
"y": {"field": "age", "type": "ordinal", "sort": "-x"}, | |
"x": {"aggregate": "sum", "field": "people", "title": "population"} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment