akvo / akvo-lumen

Make sense of your data
https://akvo.org/akvo-lumen
GNU Affero General Public License v3.0
63 stars 18 forks source link

Improve pivot table UI to emphasize data #2768

Closed Kiarii closed 2 years ago

Kiarii commented 4 years ago

Context

The idea is to improve the look and feel of pivot tables, based on pivot tables showcased in these dashboards: Tableau de bord de suivi de la collecte and Tableau de bord des indicateurs du PARIIS

Notable improvements to consider:

  1. Append aggregation method to end of aggregated indicator to prevent a twin-col-header. This is what we do with other visualizations but we break the pattern with pivot tables.

    Screenshot 2020-07-20 at 12 46 17
  2. De-emphasizing borders and adding some spacing between data and borders to enhance data legibility..

  3. Title case values, when source content is all caps, the table content is harder to read when it is all-capped as is evident in the snippet below

    Screenshot 2020-07-20 at 12 14 31
  4. Wrap long col header and values - i.e. define a column width so that the resulting table is visually balanced; in the attached example, we have a couple of long values the accommodation of which makes the second column squeezed up

    Screenshot 2020-07-20 at 12 10 45
  1. Stop truncating table content - even though we support mouseover as a way of revealing truncated text, this is not optimal; a dashboard is meant to be read or reveal patterns quickly, forcing the user to use mouseover to reveal values goes against the intention

    Screenshot 2020-07-20 at 12 10 45
  2. Add spaces between cascade item separators to make the resulting text more readable. This should also make it easier to wrap the text - This tweak might be more applicable at data importing level but the refinement will carry over to the grid and resuting visualizations

    Screenshot 2020-07-20 at 14 59 09
  3. Align the pivot table (in contrast to other types it is unique) to the left of the visualization container so that it takes use of full-container-width; centre-align also breaks the scannability (from the title to table content)

    Screenshot 2020-07-21 at 15 14 31
  4. It is not clear what a pivot table counts by default 🤔 this should be made explicit, otherwise result to a meaningful default/empty state

    Screenshot 2020-07-21 at 15 40 09
Kiarii commented 4 years ago

On points 1 and 2: Appending aggregation method to indicator name

Screenshot 2020-07-20 at 14 51 00
janagombitova commented 4 years ago

@Kiarii the twin column header is not because of the aggregation method but the first header holds the column title and the 2nd the text values of the selected column and total count if enabled:

Screen Shot 2020-07-20 at 14 37 34

Plus I removed the URLs from your description as I do not know if we have permissions from the partner to share the data in those dashboards

Kiarii commented 4 years ago

@janagombitova now I see your screenshot :) agree on the links posting matter, thanks for noting that. About your description of the pivot;

..the first header holds the column title and the 2nd the text values of the selected column..

It sounds more or less like a presentation of a MOQ data, in which case, even on the grid breaking the question and the responses i.e. creating a twin col header makes the resulting table/grid 'unbalanced'.. Looking into this..

Kiarii commented 4 years ago

on the data grid, as screenshoted below, we do not separate MOQ question from the response; in keeping the pattern (which I think is a low hanging fruit in contrast to inventing a new wheel) the challenge for pivot tables as for the grid is two fold:

Kiarii commented 4 years ago

at the least, (without supporting variable names or user defined col names) based on the example shared by @janagombitova above, we are looking at sth of this sort

Screenshot 2020-07-21 at 15 36 34

Back tracking on my previous comment, I note that we actually do have a way to rename the used col-header - which we can use as a prefix for the col-header which for the above example might be "'User defined prefix:' + 'value'" e.g. "'Main crop: Maize" e.g.

Screenshot 2020-07-22 at 10 15 52

Other minor notes:

Kiarii commented 4 years ago

This also breaks the tabular layout - application of total on the col or row shd conform to the table structure and not create floating or table cells. From the snippet above, this means that the "age of respondent" should be a "row-'header'" for the first row, with "total" being the row-header for the second i.e.

Screenshot 2020-07-22 at 10 32 05
janagombitova commented 4 years ago

I have summarised the visual improvements into the following list. I suggest we start here. Then the remaining issue is how to handle the double-header (column title and column values) that currently breaks the table layout. I suggest we discuss this one before making a decision on how to address it. Same goes for the twin-row due to total.

Pivot table initial improvements:

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.