Vegalite.jl: levels and DataFrames

I think it can be done, but supposing that it should be done automagically is wrong (for now), at least in my opinion. Typically I dislike automatisms like this, I prefer that I have to be explicit with the things I want to have in a plot and how it should be. But for VegaLite.jl this is not me who has to decide.

Despite that, the categorial values can be used just like normal columns in the DataFrame:

using VegaLite, DataFrames, CategoricalArrays

data = DataFrame(
    a=["A","B","C","D","E","F","G","H","I"],
    b=[28,55,43,91,81,53,19,87,52],
    c=["C1","C1","C2","C2","C1","C1","C2","C2","C2"]
)

categorical!(data, :c)

data |> @vlplot(
	:bar, 
	x="a:o", 
	y=:b,
	color=:c
)

The bar chart you are heading for seems to be the grouped bar chart as in your other (older) thread