[Update] Check out my new approach which is described in this video.
https://www.youtube.com/watch?v=pGWKFCnMv-0&t=18s

This is a sequel to the first article on 3-way Venn Diagram. The purpose is to make labeling a bit more automatic/dynamic. The labels are embedded in data set instead of manually annotated, although manual annotation is always an option.

What's new?

In the previous design, the labeling was done using manual annotation. Here we will pre-define the positions of the labels. There are in total 7 labels because there are 7 sections in the 3-way Venn Diagram. The labels can be created in the data set and visualized in Tableau.

The data set 

So, in the previous post, we had 3 data points defining the 3 circles. In this one we will add 7 extra data points defining the labels. We will have 10 data records in total.

The coordinates for the centers of the 3 circles are (0,1), (-sqrt(2)/2, -sqrt(2)/2),  (sqrt(2)/2, -sqrt(2)/2). Basically, these are the 3 vertices of an equilateral triangle.

The positions of the 7 labels are also relative to an equilateral triangle: 3 vertices, 3 at the middle of each side and 1 at the center. The scale is larger than the previous triangle.
The 3 vertices of the label triangle are 1.5 from the origin. The coordinates of these points can be calculated easily and will be used in the data set.


Dual Axis

To put both labels and circles in the same chart, we need to use dual axis. For this purpose, we need to create 2 subsets of Y's:

  • [Y Label]: IF [Type]='Label' THEN [Y] END
  • [Y Circle]: IF [Type]='Circle' THEN [Y] END

For the circles: Maximize size for the circles and make the circles half transparent.
For the labels: Minimize size for the label dots and make them 100% transparent.

Dual Axis with adjustable label positions

To enable the tuning of label positions, we added a scale parameter to the coordinates of the labels:

  • [Scaled X Label]: IF [Type]='Label' THEN [X]*[Label Range] ELSE [X] END
  • [Scaled Y Label]: IF [Type]='Label' THEN [Y]*[Label Range] END

These coordinates are used to dual axis with [Y Circle]. See below for details of the parameter [Label Range].

Fine-tune the positions of circles and labels

To adjust the overlapped area of the circles, we created a parameter [Circle Range], a float number between 1-10 (default at 2.5). The tuning is done through adding reference lines in both X and Y axis, based on both [Circle Range] and -[Circle Range].
To adjust the positions of the labels, we created a parameter [Label Range], a float number between 1-2 (default at 1). The tuning is done through scaling the triangle on which the labels are placed.
After all, we can always manually tune each of the labels by selecting and dragging it. If we need to have multi-lines of text, we can create a few more columns of text and add them to the text/label shelf.

Voila, that's about it. Click image below to go to the interactive version.
1

View comments

(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.