livebook-dev / vega_lite

Elixir bindings for Vega-Lite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Same code but different rendered picture with vega lite

ray-sh opened this issue · comments

commented

Vl.new(width: 400, height: 80)
|> Vl.data_from_url("https://vega.github.io/editor/data/penguins.json")
|> Vl.transform(density: "Body Mass (g)", groupby: ["Species"], extent: [2500, 6500])
|> Vl.mark(:area)
|> Vl.encode_field(:x, "value", type: :quantitative, title: "Body mass (g)")
|> Vl.encode_field(:y, "density", type: :quantitative, stack: true)
|> Vl.encode_field(:color, "Species", type: :nominal)

visualization(2)

https://vega.github.io/vega-lite/docs/density.html

Screenshot 2023-05-28 at 18 15 43
commented

OS: Mac 13.3.1 (22E261) Firefox: 109.0.1 (64-bit)

Fixed in kino_vega_lite v0.1.9 :)