Tableau's default labeling of Pie chart is outside of the pie. But some may prefer to put the labels inside, which is not obvious.

There are 3 ways to do it, depends on what you need.

1.Static labeling

If you only want a screenshot or for presentation only, just drag the labels to where ever inside the pie chart. You can use this technique. Once the data change, the positions of the labels will change. So this won't work for dynamic data.

2.Labeling in the center

The method is to create two pie charts: one big and one small. Put the label in the center of the small one. Then lay the small it on top of the big one through dual axis. This kind of chart is called donut chart, such as this and this and this.
3.Labeling on the pie slices

Similar to the previous one, here are the major steps:
- Create a calculated field Zero which has value 0. Use it in Columns as discrete blue pill and twice in Rows as continuous green pill.
- Create one big and one small pie charts with the same dimensions and colors.
- Label the small one.
- Then lay the small one on top of the big one vis Dual Axis.
- Adjust the sizes of  pies so that labels are inside the big pie.
- Format the chart to remove the zero line.
Here are the views before and after dual axis.
4.Label inside donut chart
This is a variation of the 3rd. Just assign the same color to all slices, by using a duplicate dimension for coloring. We got this chart.
Voila! Click the above images to view the interactive version.
4

View comments

  1. Hi, great work.

    how did you create the dynamic chart?

    ReplyDelete
    Replies
    1. It is dynamic. To be 100% sure of being inside, you may need to use smaller font size for labels, and increase the size of the band between the big and small pies.

      Delete
    2. Hi! I can't seem to resize the pie charts individually. When I change the slider of one, they both change.

      Delete
    3. Check the new video and see if it solves your problem.

      Delete

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