4 Replies Latest reply on Feb 1, 2018 7:37 AM by Michael Hesser

# Having problems with Radial Pie Gauge Chart

Hey folks,

I have created a radial pie chart that attempts to demonstrate a sports team's progress through a season. It works really well when the entire seasons data is available (i.e. at the end of the season) but looks less than great during the season - say round 1 or round 2.

This looks good - round 17, end of season, all data in.

Now for round 1, this is what I get but I would rather it looked like round 17, just the blue bars wont have come around - they'll be appropriately sized.

Here is another problem (teams belong to conferences). When I filter by conference with the winning team with 65 points - the chart looks great. When I filter a conference with poor performing teams, the chart size goes haywire again:

Here are the formulas I am using for x and y values:

x =

IF [Index] < 270 THEN

SIN([Index]*[wc_percentage]*[wc_pi]/180)*[wc_start]

ELSEIF [Index] > 270 THEN

SIN((540-[Index])*[wc_percentage]*[wc_pi]/180)*([wc_start]+1)

ELSE

SIN(([Index]*[wc_percentage]+3)*[wc_pi]/180)*([wc_start]+0.5)

END

y =

IF [Index] < 270 THEN

COS([Index]*[wc_percentage]*[wc_pi]/180)*[wc_start]

ELSEIF [Index] > 270 THEN

COS((540-[Index])*[wc_percentage]*[wc_pi]/180)*([wc_start]+1)

ELSE

COS(([Index]*[wc_percentage]+3)*[wc_pi]/180)*([wc_start]+0.5)

END

• ###### 1. Re: Having problems with Radial Pie Gauge Chart

Hi Jason;

Could you provide us with a sample file, even if the data is mocked-up?

It seems clear that Tableau is getting messed up when asked to present an diagram where the largest arc is < 270 or 75% of a full circle.

I think there are a couple of different approaches you could use to resolve this, based on how you want to present things.

If you want consistent circles, referencing your window_max([wc_percentage]) should tell you what your maximum value is; you can use a ratio of  this when plotting the arcs.

In your first example, your maximum is 65, perhaps each arc represents a fraction of 120% of this number, e.g. {65/78, 63/78, 58/78...} . Using this value in your second example, your minimum value would become: 5/6 = 83% (meets >75% criteria).

This process, however, means your arc lengths are dependent on their ratio to others, not the number of games won.

To get a more progressive view of the games won, instead of using a calculated value (1.20*window_max(max(wc_percentage))), you can use a static number, such as 80.

Additionally, you'll want to plot not only where the arc is, but where it is not-- and graph that "incomplete" portion of the arc with your background color. You might be able to get this done on a dual axis and plotting a single circle (pie), where the radius is equal to your outermost element-- this might be simpler than graphing the visible and non-visible part of each arc.

Doing this will get:

Team labels in the upper quartile of the graph

Arc lengths that are reflective of your KPI and will grow over time

Consistently display a graph of 360 degrees, even when there are few games played, or a filter has limited the view.

I apologize in advance for sounding more theoretical than giving you concrete examples, but I do really need to see what you're working with to tinker with it

Something to think about: in your "round 1" example, a lot of your teams' records are equal, but they're not displayed this way. This is true of your end of season, too-- can you really tell that the Cheetahs and Reds tied, yet they beat the Bulls? You might want to consider changing your endpoint or adding a reference line, just to make it easier to interpret.

Thanks!

--Michael

• ###### 2. Re: Having problems with Radial Pie Gauge Chart

Hi Michael - of course. Data can be accessed here:

• ###### 3. Re: Having problems with Radial Pie Gauge Chart

I have the solution... and I feel slightly embarrassed at how easy it is... Thanks for your help and advice though. I agree on the reference lines

I just need to fix the axis...

1 of 1 people found this helpful
• ###### 4. Re: Having problems with Radial Pie Gauge Chart

Woo hoo! That was MUCH easier!!! Great work!