Sorted bar chart

Source code Author

using Deneb

data = Data(url="https://vega.github.io/vega-datasets/data/barley.json")

chart = data * Mark(:bar) * Encoding(
    x="sum(yield):Q",
    y=field("site:N", sort="-x"),
)

This page was generated using DemoCards.jl and Literate.jl.