deephaven / deephaven-plugins

Deephaven Plugins
5 stars 12 forks source link

feat: UI table layout hints #587

Open mattrunyon opened 1 week ago

mattrunyon commented 1 week ago

Fixes #442

The layout hints will only be used as the initial state. Not sure how we'd want to try to combine a change in ui.table from the server w/ other changes the user may have made already. At least initially I think this is fine to give the same functionality as current table.layout_hints

from deephaven import ui
from deephaven.plot import express as dx

_stocks = dx.data.stocks()

stocks_with_hints = ui.table(
    _stocks,
    front_columns=["exchange"],
    frozen_columns=["sym"],
    back_columns=['side'],
    hidden_columns=['dollars', 'SPet500'],
    column_groups=[{"name": "test_group", "children": ["size", "random"], "color": "lemonchiffon"}]
)