Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AoG doesn't respect the levels of a categorical vector when transformation is applied #491

Open
pdeffebach opened this issue Mar 1, 2024 · 0 comments

Comments

@pdeffebach
Copy link

Here's an MWE

julia> using CategoricalArrays; 

julia> d = DataFrame(x = ["z", "a", "b"], v = [1, 2, 3]);

julia> d.x = categorical(d.x, ; levels = d.x);

julia> data(d) * mapping(:x, :v) * visual(BarPlot) |> draw

julia> # So far so good!

julia> d_labs = Dict("z" => "Z", "a" => "A", "b" => "B");

julia> data(d) * mapping(:x => (t -> d_labs[t]), :v) * visual(BarPlot) |> draw

It would be great is I could apply the transformation but then alzo have the "z" row go first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant