diff --git a/music_library.livemd b/music_library.livemd index 6d94f76a..6fd1b9e8 100644 --- a/music_library.livemd +++ b/music_library.livemd @@ -41,6 +41,16 @@ count_by_artist = ) ``` + + +```elixir +VegaLite.new(width: 600, title: "Count by Artist") +|> VegaLite.data_from_values(count_by_artist, only: ["c", "name"]) +|> VegaLite.mark(:bar) +|> VegaLite.encode_field(:x, "c", type: :quantitative) +|> VegaLite.encode_field(:y, "name", type: :nominal) +``` + ### Count of records by genre