Sharon left a message in my last post on Labeling Trellis Chart Anywhere asking whether we can have one label on the left and another on the right per trellis chart cell in Tableau. Yes we can. Below we will show how to place multiple labels within a trellis cell.

Label's Horizontal Positions 

Assume our data is a time series and the horizontal dimension is Date. Then here are a few examples.

  • Label on the left is defined by First()=0.
  • Label on the right is defined by Last()=0.
  • Label in the center is defined by Index()=Int(Size()/2)

Here are some of the labels we use in the above trellis chart:

In the label editor, we compose the labels. Both the left label and right labels are placed on the first row. Depending on horizontal positions, some labels are on when the others are off. The 2nd row has only labels on the right. The alignment is set to be center-aligned.

How many labels can we place within a trellis cell? Probably more than we need. We can add as many labels as there are dates or months. 

Label's Vertical Positions

In the previous trellis chart, both labels have equal height at the top. The height of both is defined by the following function:
Note that the vertical axis is fixed from 0 to 1. Since we know there are only two labels and their exact positions, we could alternatively write Label Height 1 as
  • If First()=0 or Last()=0 Then 1 End
The horizontal grid is defined already by Date. We will show how to use Label Height 2 to define the vertical positions of labels. 

In the above chart, we have 2 labels per trellis cell. We write Label Height 2 as follows:

Note that the height for the labels in the center is -0.2. The vertical axis is fixed between -0.2 to 1.

Conclusion

We can place multiple labels per trellis cell. And again we can label them anywhere. 

Feel free to download the demo workbook. If you have questions, leave comments or contact me at twitter @aleksoft.
0

Add a comment

(Refresh the page if you want to view the gif image multiple times. Or go to Tableau Public and click the button at the top-right corner.)

Jake and I collaborated on a dashboard. He told me that he learnt a way to create an in-place help page in Tableau. He first saw it at a conference somewhere and couldn't recall who the speaker was. So I am blogging here about it but the credit goes to somebody else. If anyone knows who the original creator is, leave a comment below.

The key idea is to float a semi transparent worksheet on top of the dashboard, where a help text box is strategically placed on top of each chart. This way, we can explain how to view each chart and what data points are important, etc. This worksheet is collapsible by a show/hide button. 

Below I would like to show how this worksheet can be constructed.

1. Sheet with a single data mark.

  • Double click the empty space in Marks panel and add two single quotes. Make the null pill a text label. This creates a single null mark.
  • Set the view as "Entire View"

2. Create an show/hide button

  • Go to the target dashboard
  • Drag a floating vertical container to the dashboard, making it cover all the area of interest.
  • Drag the Single Null Mark sheet and drop it into the above container. Hide the sheet title.
  • Create an open/close button for the container and place the button at the top-right corner.

3. Add annotations

  • Format the sheet background opacity as 70% in the layout manager             
  • Select area annotations and place them anywhere of interest. 
  • Write help text and format it to highlight important messages.  
  • The text can serve as functional guide and/or insight guide.

Here is an example. Feel free to download the workbook and explore. Click the "i" button at the top-right corner to view the in-place help. 

0

Add a comment

Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.