DearPyGui_Ext icon indicating copy to clipboard operation
DearPyGui_Ext copied to clipboard

Data Grid Widget

Open hoffstadt opened this issue 4 years ago • 5 comments

Feel free to comment additional suggestions.

Background

Although the table API is powerful, it is not the most friendly API for users wanting to quickly display data and requires a lot of manual setup. A higher level API written on top of the table API is desired. Something similar to the 0.6 simple table API but more powerful.

Required Functionality

  • Performant - easily display 100k's of rows
  • Easy
  • Column level control item types
  • Per-column settings
  • Sizing policies
  • Row/column appending
  • Row/column insertion
  • Sorting
  • Row/column deletion
  • Filtering
  • Selections
  • Reordering
  • Other settings

Methods

This will be object oriented and thus will be operated on through various methods. Below are the current public non-obvious methods:

  • insert_column(...) & insert_row(...)
  • append_row(...) & append_column(...)
  • delete_row(...) & delete_column(...)
  • get_cell_value(...) & set_cell_value(...)
  • hide_column(...) & show_column(...)
  • hide_row(...) & show_row(...)
  • get_column(...) & set_column(...)
  • get_row(...) & set_row(...)
  • get_selections(...) & set_selections(...)
  • highlight_row(...) & highlight_column(...) & highlight_cell(...) & undoing these

hoffstadt avatar Aug 18 '21 20:08 hoffstadt

Here are some suggestions. Not sure if they are superfluous or too difficult, but here goes.

  • Easy way to make the font of the header and first column (column #0, I guess) bold or set a specific font (maybe has already been solved in the Tables API and therefore also in Datagrid).
  • Aligning the values in the cell (left, centre, right), especially to the right for numbers.
  • Get the row(s), column(s) or cell(s) that are selected by the user.

DataExplorerUser avatar Aug 24 '21 11:08 DataExplorerUser

With regard to performant, I'd like to add that it should be performant to

  1. load data, e.g. from a Pandas dataframe
  2. interact with the datagrid, e.g. show, scroll, filter data and the like.

DataExplorerUser avatar Aug 24 '21 11:08 DataExplorerUser

Be able to retrieve the filters, etc. that have been applied to the data by the end user. For example, if the end user wants to export the data selection, you would need to know the applied filters.

DataExplorerUser avatar Aug 24 '21 11:08 DataExplorerUser

This seems very interesting for my project! I’d like to have the ability to fill the table from the top, in anti-chronological order without any fuss. i.e. appending a row results in it being displayed just under the header. I haven’t found a reliable way to do this in the current table implementation and using the before parameter of dpg.table_row() doesn’t seem to work.

rdoursenaud avatar Feb 21 '22 19:02 rdoursenaud

Please add this feature, and this will be very useful for date science baed project, thank you!

weigao-123 avatar Jan 17 '23 19:01 weigao-123