Kino (Kino v0.1.0) View Source

Interactive widgets for Livebook.

Link to this section Summary

Functions

Sends the given term as cell output.

Link to this section Functions

Specs

render(term()) :: term()

Sends the given term as cell output.

You can think of this function as a generalized IO.puts/2 that works for any type and is rendered by Livebook similarly to regular evaluation results.

Examples

Arbitrary data structure

Kino.render([%{name: "Jake Peralta"}, %{name: "Amy Santiago"}])

VegaLite plot

Vl.new(...)
|> Vl.data_from_series(...)
|> ...
|> Kino.render()

# more code

Widgets

vl_widget =
  Vl.new(...)
  |> Vl.data_from_series(...)
  |> ...
  |> Kino.VegaLite.start()

Kino.render(vl_widget)

# stream data to the plot