-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Column sources for ui.table formatting (#1010)
Fixes #984 Allows all string format values to instead specify a column as the source. Ensures the column is always fetched and throws if the column is not a string type (can cause some really bad performance issues if value formatting is invalid). Also modified to just resolve all theme colors since this change could lead to unresolved theme colors in a column source. The example in the docs or this example shows the feature working. Change the String cast on line 6 to non-string to test the error is thrown and displayed. This example uses an input table joined to the table so you can adjust the formatting colors via input table (something Raffi asked about specifically) ```py from deephaven import input_table from deephaven import ui import deephaven.plot.express as dx _stocks = dx.data.stocks() _source = _stocks.select_distinct("Sym").update("Color=(String)null") color_source = input_table(init_table=_source, key_cols="Sym") t = ui.table( _stocks.natural_join(color_source, "Sym", "SymColor=Color"), hidden_columns=["SymColor"], format_=[ ui.TableFormat(cols="Sym", background_color="SymColor") ], ) ```
- Loading branch information
1 parent
1343ec8
commit c25f578
Showing
9 changed files
with
98 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,6 @@ test-results/ | |
playwright-report/ | ||
blob-report/ | ||
playwright/.cache/ | ||
|
||
# Ignore docs | ||
**/*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+15.4 KB
...spec.ts-snapshots/UI-flex-components-t-color-column-source-1-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.5 KB
....spec.ts-snapshots/UI-flex-components-t-color-column-source-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.2 KB
...e.spec.ts-snapshots/UI-flex-components-t-color-column-source-1-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.