Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriseyre2000/7efb9eb807555b2a86d7cdfd2ac7879b to your computer and use it in GitHub Desktop.
Save chriseyre2000/7efb9eb807555b2a86d7cdfd2ac7879b to your computer and use it in GitHub Desktop.
You can't catch up: Once you are behind you can never recover
Mix.install([
{:vega_lite, "~> 0.1.0"},
{:kino, "~> 0.2.1"}
])
alias VegaLite, as: Vl
vl_widget =
Vl.new(width: 400, height: 400)
|> Vl.mark(:line)
|> Vl.encode_field(:x, "x", type: :quantitative)
|> Vl.encode_field(:y, "y", type: :quantitative)
|> Kino.VegaLite.new()
|> Kino.render()
total = 0;
for i <- 1..26 do
total = i * 10
point = %{x: i, y: total}
Kino.VegaLite.push(vl_widget, point)
Process.sleep(25)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment