metasoarous / oz

Data visualizations in Clojure and ClojureScript using Vega and Vega-lite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Oz does not seem to respect the xOffset setting

athos opened this issue · comments

I'm porting this Vega-Lite example code to Oz. When I tried it with Oz like this:

(require '[oz.core :as oz])

(oz/view! {:data {:values
                  [{:category "A" :group "x" :value 0.1}
                   {:category "A" :group "y" :value 0.6}
                   {:category "A" :group "z" :value 0.9}
                   {:category "B" :group "x" :value 0.7}
                   {:category "B" :group "y" :value 0.2}
                   {:category "B" :group "z" :value 1.1}
                   {:category "C" :group "x" :value 0.6}
                   {:category "C" :group "y" :value 0.1}
                   {:category "C" :group "z" :value 0.2}]}
           :mark "bar"
           :encoding
           {:x {:field "category"}
            :y {:field "value" :type "quantitative"}
            :xOffset {:field "group"}
            :color {:field "group"}}})

I saw the following result rendered, which doesn't seem to respect the xOffset setting:

Screen Shot 2021-12-20 at 22 37 31

Do you have any idea on what is going on?

Hi @athos. Thanks for reporting.

I'm assuming this is just a bug with some specific vega library.

If you want to test this out, you could follow the instructions in the README on the latest vega-lite & vega versions:

https://github.com/metasoarous/oz#debugging--updating-vegavega-lite-versions

Last time I tried to update, there may have been an issue with the latest vega-embed, so maybe don't update that one until I've had a chance to sort it out.

I'll try to cut a release with updated versions soon.

Thanks again

@metasoarous Thank you for the quick response!

I'll try to cut a release with updated versions soon.

I'm looking forward to it!

Hello again @athos. I just released 2.0.0-alpha5 with the latest vega library versions. Please give that a shot and let me know if it fixes this issue. Thanks!

@metasoarous Hi, thanks! I've confirmed 2.0.0-alpha5 fixes the issue 👍

visualization

Excellent; Thanks for reporting back!