diff --git a/music_library.livemd b/music_library.livemd index 6fd1b9e8..58512c38 100644 --- a/music_library.livemd +++ b/music_library.livemd @@ -71,6 +71,14 @@ count_by_genre = ) ``` +```elixir +VegaLite.new(width: 600, title: "Count by genre (alt)") +|> VegaLite.data_from_values(count_by_genre, only: ["c", "value"]) +|> VegaLite.mark(:bar) +|> VegaLite.encode_field(:x, "c", type: :quantitative) +|> VegaLite.encode_field(:y, "value", type: :nominal, sort: "-c") +``` + ```elixir