Skip to content

Commit faefd29

Browse files
committed
Add docs
1 parent 3341f6e commit faefd29

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

plugins/ui/docs/components/table.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,23 @@ t = ui.table(
284284

285285
![Example of column order and visibility](../_assets/table_column_order.png)
286286

287+
## Column Display Names
288+
289+
You can set custom display names for columns using the `column_display_names` prop. The `column_display_names` prop takes a dictionary where the key is the column name and the value is the display name. The display name can be any string, so this can be used to show a user-friendly name that does not adhere to column naming rules.
290+
291+
```py
292+
from deephaven import ui
293+
import deephaven.plot.express as dx
294+
295+
t = ui.table(
296+
dx.data.stocks(),
297+
column_display_names={
298+
"Price": "Price (USD)",
299+
"Side": "Buy/Sell"
300+
}
301+
)
302+
```
303+
287304
## Grouping columns
288305

289306
Columns can be grouped visually using the `column_groups` prop. Columns in a column group are moved so they are next to each other, and a header spanning all columns in the group is added. Columns can be rearranged within a group, but they cannot be moved outside of the group without using the table sidebar menu.

0 commit comments

Comments
 (0)