mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-10 17:15:09 +08:00
Update Kino references to the latest version (#479)
This commit is contained in:
parent
917e59c57d
commit
e8eee5c495
2 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ and interact with it.
|
|||
|
||||
```elixir
|
||||
Mix.install([
|
||||
{:kino, "~> 0.2.1"},
|
||||
{:kino, "~> 0.3.0"},
|
||||
{:vega_lite, "~> 0.1.0"}
|
||||
])
|
||||
```
|
||||
|
@ -72,7 +72,7 @@ widget =
|
|||
|> Vl.encode_field(:x, "x", type: :quantitative)
|
||||
|> Vl.encode_field(:y, "y", type: :quantitative)
|
||||
|> Kino.VegaLite.new()
|
||||
|> Kino.render()
|
||||
|> tap(&Kino.render/1)
|
||||
|
||||
# Add a callback to run every 25ms
|
||||
Kino.VegaLite.periodically(widget, 25, 0, fn i ->
|
||||
|
@ -216,7 +216,7 @@ widget =
|
|||
|> Vl.encode_field(:x, "x", type: :quantitative)
|
||||
|> Vl.encode_field(:y, "y", type: :quantitative)
|
||||
|> Kino.VegaLite.new()
|
||||
|> Kino.render()
|
||||
|> tap(&Kino.render/1)
|
||||
|
||||
for i <- 1..300 do
|
||||
point = %{x: i / 10, y: :math.sin(i / 10)}
|
||||
|
|
|
@ -14,7 +14,7 @@ so let's add `:vega_lite` and `:kino` for that.
|
|||
```elixir
|
||||
Mix.install([
|
||||
{:vega_lite, "~> 0.1.0"},
|
||||
{:kino, "~> 0.2.0"}
|
||||
{:kino, "~> 0.3.0"}
|
||||
])
|
||||
```
|
||||
|
||||
|
@ -247,7 +247,7 @@ widget =
|
|||
|> Vl.encode(:color, datum: [repeat: :layer], type: :nominal)
|
||||
)
|
||||
|> Kino.VegaLite.new()
|
||||
|> Kino.render()
|
||||
|> tap(&Kino.render/1)
|
||||
|
||||
Kino.VegaLite.periodically(widget, 200, 1, fn i ->
|
||||
point =
|
||||
|
|
Loading…
Reference in a new issue