Closed rbasralian closed 10 months ago
We'd need a sticky row to display the aggregation key. This is a bit more complicated than just not showing the key.
Excel does not appear to sticky the row, FWIW
Example expanded pivot table:
Same thing after scrolling down a few rows — note the grouping values are no longer visible:
It is still probably more of a concern for us (since the data will usually be dynamic, so added/removed rows or rollup keys can make it harder to track the context of what you're looking at).
From further discussion, what they really want is for the keys to be in their own column, as in the ag-grid example:
They are not concerned about keeping the aggregation keys 'sticky'.
As in dumping all the keys into one visual column?
That would make it hard to sort or filter the columns.
The key columns could still exist independently as well (e.g. "Name" here: https://github.com/ag-grid/ag-grid/blob/latest/github-grid-demo.jpg)
If duplicating is desirable I guess that would work, to show it.
The other concern I have is that column is no longer an actual column of data, like it would be purely a visual column that is pretending to be one column of data, when it is actually several. So that could also be mis-leading. Do you have thoughts on that.
Like say you group on sym + exchange. Do you present a new column with a made-up name like "Roll-up" or "Group" as in that ag-grid containing the mixed ones, but then also duplicate in a sym/exchange columns as well still? That "Roll-up" or "Group" column wouldn't actually exist on the table though, and we've also added table width by duplicating.
Just trying to talk through all the problems if we want to arrive at a better solution.
I agree that it's a bit unnatural for us to have a "fake column" that's really just a UI construct.
Keeping the original real columns (e.g. "Sym" and "Exchange") in addition to the synthetic "Group" column is actually what makes it tolerable to me; you can still use the real columns for filtering/sorting/seeing clearly which row you're looking at even if you've scrolled, and the "Group" column is just for expanding/collapsing rollup levels.
We'd have to add the "Group" column for CSV exports too. It's also a bit awkward to add it there, but I assume not too different to implement than doing it in the UI.
To clarify the requested change for @mofojed
A user has requested that rollups only display the aggregation key values in the "rolled-up" row, and not in the expanded rows. For example, instead of a rollup looking like this:
they'd prefer it like this:
Below are examples from other UIs.
ag-grid:
Excel:
Relates to #1483.