deephaven / deephaven-ipywidgets

Deephaven Community IPython Widget Library
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Support displaying more than one table #47

Open jjbrosnan opened 3 months ago

jjbrosnan commented 3 months ago

It would be awesome to be able to display tables side-by-side, or in a grid. Something like:

display(DeephavenWidget([t1, t2]) # Default is side-by-side for multiple tables
display(DeephavenWidget([t1, t2], rows=2, cols=1) # Display on top of one another
display(DeephavenWidget([t1, t2, t3, t4], rows=2, cols=2) # Display a 2x2 grid. Ordering top left, top right, bottom left, bottom right?
jnumainville commented 3 months ago

This can already be done through deephaven ui and I think that's the way we'll want to do it, but maybe we should add some documentation to this project.

For example:

from deephaven import empty_table
from deephaven_ipywidgets import DeephavenWidget
import deephaven.ui as ui
t = empty_table(1000).update("x=i")
flex_t = ui.flex(t, t)
display(DeephavenWidget(flex_t))
Screenshot 2024-08-05 at 11 43 11 AM