Better Tables
A number of years ago (2020), Tableau Visionary, Ludovic Tavernier, created a dashboard that showcased two tables: one was a standard default-looking table and the second was a highly customized table using a number of tricks including the notorious MIN(1.0) technique which allows for multiple data points in one "column". You can see how much he was able to improve upon the original table, all while keeping the same level of information but it a much more consumable design.
Original "Better Table" visualization from 2020 on Tableau Public. Credit Ludovic Tavernier.
While the transformation of the table as a whole was inspiring and beautiful, what originally caught my eye in this viz when I first saw it back in 2020 was the last column. The rounded shape highlighted the shipment status and used both color and text to denote the value, thus creating a quick indicator of "look here" based on the color. What I thought was quite clever was the duo color scheme - a dark border with a light fill.
Color Limitations
Unfortunately, Tableau has some limitations with color depending on the mark type. If you use a shape mark, you cannot add a border (or stroke) at all (see image below for the circle shape). However, if you use another mark type, like a bar, you can change the opacity of the fill but not the border, but the border color is fixed and each colored mark (see image of the bars below) will have the same border color despite a different fill color.
Fill and border differences in Tableau depending on mark type
Ludovic got around these coloring issues by actually using TWO marks - two LINES, in fact. Yes, very fat lines using Measure Names and Measure Values. I actually used this approach with a client in 2021, but it comes with a lot of challenges and extra work. First, you need two of the same calculation for color to achieve the look of one line mark being darker than the other. Secondly, adjusting the sizing so that one line mark is ever-so-slightly larger than the other one can be a headache. Lastly, labeling is a pain and it's almost impossible to get a nice centered label.
Example of table with dual axis lines to create duo tone shape. Credit Lindsay Betzendahl.
Luckily, I'm here to tell you there is an even BETTER and easier way to do this! I'm all for easier when it comes to adding design aesthetic to your dashboards.
Better Shapes = Even Better Tables
While working with another client recently, I wondered about using opacity within my shape to see how Tableau would manage it. Turns out, Tableau does a great job with it!
For this simpler approach, all you need to do is create a shape with a 100% full colored stroke/border with a fill with some level of opacity (I used 20% for mine). The shape color doesn't matter - I used gray. Save that shape as a PNG using your tool of choice (Figma or PowerPoint, for example) to your Tableau Shape Repository.
Reload your shape files in Tableau and place that shape on an inline calculation of MIN(1.0). Set the axis range from 0-2 and add your dimension (or measure) field onto color. Hide the header, add your label and center align it. That's it!
Example of using shapes with opaque fill and full stroke. Credit Lindsay Betzendahl.
I think this approach is super easy and I'm sure there are many other ways you could use opacity in shapes within Tableau so if you think of any other use cases, please let me know.
Hopefully this was helpful and something new for your Tableau toolbox of tricks! You can check out the full dashboard here.
Cheers,
Lindsay
No comments:
Post a Comment