Multi-component arrays in Spreadsheets

November 5, 2018

Sometimes it’s the simplest things that can have a huge impact on usability. For today’s case study, let’s look at Spreadsheet view in ParaView. Spreadsheet View offers a very simple and immensely useful capability to inspect raw data. Together with linked selection i.e. ability to highlight elements in one view and see the same elements highlighted in another view, Spreadsheet view is indispensable for any exploratory viz. session.

Spreadsheet View uses QTableView. QTableView helps us provide several of the behaviors one would expect from such a tabular view, e.g. selectable rows, resizable column headers, etc. One thing lacking, however, is the support for a notion of multi-component columns or arrays. Vectors, normals, tensors etc. are often represented as multi-component arrays and are very common in scientific data analysis world.

Previously, such multi-component arrays were shown under the same column with each component separated by a comma. We observed that this made is tricky to vertically align each of the components. That itself made it hard to users to quickly parse a column and determine the value for any component — one had to parse the complete column to note the commas.

Showing each component in a separate column was another option, but that would result in a dense header. An ideal solution would be a show each of the components in separate columns with a single header spanning all the components. That’s exactly what we have added to ParaView and will be available in 5.7 release.

This is supported by adding a new class, pqMultiColumnHeaderView,  that simply renders adjacent columns with same label as single wide column in the header. One can still resize the columns for each of the components from the header.

Acknowledgements

The work was funded by Sandia National Laboratories. For design discussion that led to this implementation, please see the feature request here.

Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Tags:

1 comment to Multi-component arrays in Spreadsheets

Leave a Reply to Andrew MacleanCancel reply