From 47e03969f23a5866766e01266c3fcd509714c807 Mon Sep 17 00:00:00 2001 From: mikebender Date: Wed, 11 Oct 2023 16:46:18 -0400 Subject: [PATCH] Add more questions about the color_ methods, view args on ui.table --- plugins/ui/DESIGN.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plugins/ui/DESIGN.md b/plugins/ui/DESIGN.md index 6846290cd..8fa493ff6 100644 --- a/plugins/ui/DESIGN.md +++ b/plugins/ui/DESIGN.md @@ -898,7 +898,7 @@ d = my_dashboard() ```py import deephaven.ui as ui -ui_table = ui.table(table: Table) -> UITable +ui_table = ui.table(table: Table, **view_args: dict) -> UITable ``` It has an [immutable fluent](https://en.wikipedia.org/wiki/Fluent_interface#Immutability) interface, similar to Deephaven `Table`. That means each method below will return a new `UITable` object, rather than modifying the existing one. This allows you to chain multiple customizations together, e.g.: @@ -909,11 +909,17 @@ from deephaven import ui # Create a table with some customizations ui_table = ( ui.table(source) - .format_columns(["X = Y > 5 ? RED : NO_FORMATTING"]) + .color_column("X", ["X = Y > 5 ? RED : NO_FORMATTING"]) .column_group("Group 1", ["Col1", "Col2"], "RED") ) ``` +You can also set margins and padding by passing in the appropriate arguments to the `ui.table` function: + +```py +ui_table = ui.table(source, padding="size-250") +``` + `ui.table` will support the below methods. ##### aggregations @@ -1036,6 +1042,10 @@ ui_table.color_column( | `background_color` | `Color \| None` | The background color. Accepts hex color strings or Deephaven color names. | + ##### color_row @@ -1052,6 +1062,11 @@ ui_table.color_row( ) -> UITable ``` + + ###### Parameters | Parameter | Type | Description |