Monday, December 29, 2014

text - What is the best practice for data table cell content alignment


We are currently working on a windows based application where users capture data. Some data is captured in a table where other data is captured in text blocks. Im currently faced with the dilemma of how to align contents specifically decimal values. Editable cells in a grid are indicated with a pencil icon which disappears once in edit mode. You will notice that the table consists of various field types, decimals and text. So what should I do and why?


A> right align all cell content


B> left align all cell content



C> right align only decimal values in cells


D> Whatever else you can suggest


enter image description here



Answer



Left align is basically the default for Left to Right languages just because all content will line up; this is a powerful tool for readability. Generally stick with left aligning unless there's good reason not to.


The exception, as you notice, is numbers. Here's a little blurb by Christian Heilmann:



I chatted quickly with Luke Wroblewski about it (one perk of working in the same company) and we both agreed that if there are several fields, for example in a spreadsheet application, then monetary or generally number fields should be right aligned as that allows you to add them up quickly in your head without having to worry about decimals.



Especially in accounting spreadsheets numbers (especially dollar amounts) are almost always right aligned as this lines up the "decimal point" of the numbers and makes sure each column of numbers is the same order of magnitude, making for very easy in-your-head math. You can easily add up all the millions/tens/whatever order of magnitude without having to check the length of each number to see what the magnitude of the rightmost digit is.



As an added appeal to consistency, and accountants/financially inclined people are likely used to right alignment for the numbers, and if you ask them they'll probably tell you why; it's easy to add them up. I've gotten complaints when a report for accounting has left-aligned numbers; it's just not "natural" due to the convention, and as I've explained, the convention makes good sense.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...