-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataGrid] Transpose columns into rows #3285
Comments
Looking at the example you gave from Unity, couldn't your consider the param name as a column and the value as another column? It's basically reshaping the data to be rendered in a grid. The only thing missing is the ability to hide the headers. |
@m4theushw Yes, I originally convoluted this together in #3282, but cleaned that issue up to isolate hiding headers. Here, I was thinking either:
But you're right, this could be a two-column key / value pair grid - logic for that might be a bit more obtuse to handle, as there seemed to be an elegance if the data model was expressed via Data Grid columns. If this feature request of transposing columns to rows, or introducing row headers doesn't resonate with the roadmap of Material UI Data Grids, I'll understand - this might simply be outside the intended usage here. |
It's not in our roadmap, at least for now. I added the "waiting for 👍" label so other users with the same pain can upvote and we know if we should allocate time for it. The possibility of hiding the column headers is something we need to address. |
Hello, any updates on this ? |
Hello, |
Hey @aimad-majdou @davidnir1, |
Hi @cherniavskii, I can share my use case if it helps. I have data with much more "columns" (headers) than "rows" (data points). Also, the header text can be quite long. Since text is arbitrarily wide, but only as high as the font size, it's more efficient (in terms of information density) to stack the headers vertically. Consider this table:
this takes a lot of horizontal space, and will quickly need a scrollbar. But in this table:
the same information is displayed in a much more compact form. This remains true as long as there aren't many data points (in which case horizontal scrolling feels unnatural). Hope this is clear :) Also, I'm open for alternative ideas. |
@m4theushw or anyone else |
Hello, any news on it ? it would be awesome to possibly do this |
Duplicates
Latest version
Summary 💡
Feature request to transpose the grid - reverse columns and rows.
Similar to pivot tables in #214, but just a matrix transform operation.
Changing from this:
...into this:
Examples 🌈
Spreadsheets such as Microsoft Excel have a similar notion of transposing columns into rows, such as here or here
Motivation 🔦
Stems from a discussion in #3282 where I hoped to use editable data grids for property panels, such as in Unity:
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: