In [1]:
import itables # inserts require.js script/css tags into the Jupyter Notebook web page
In [2]:
import seamless.highlevel
ctx = seamless.highlevel.load_graph("datatables.seamless", zip="datatables.zip")
await ctx.computation()
In [3]:
from ipywidgets import IntSlider
In [4]:
a_first = IntSlider(min=0,max=10,step=1)
ctx.a_first.traitlet().link(a_first)
a_step = IntSlider(min=0,max=20,step=1)
ctx.a_step.traitlet().link(a_step)
a_first
In [5]:
ctx.a_first.value
Out[5]:
In [6]:
o = ctx.datatable.output()
o.output_instance.layout.min_height = "500px" # Jupyter workaround
o
In [7]:
# A OutputWidget refresh must be triggered manually once when initialization is finished
# For subsequent updates, the table updates correctly already
import asyncio
await asyncio.sleep(1)
o.refresh()