*Note: The following is a guest post by Jonathan Trajkovic. *

Radar charts are a great way to compare members of a dimension in a function of several metrics. For example, when you want to buy a smartphone, you can use a radar chart to compare several devices across several metrics like battery life, camera quality, and memory capacity.

Here’s how to create a radar chart in Tableau.

## Trigonometry, my best friend ever!

To create a radar chart, we have to use trigonometry formulas—you remember the circle with Pi, and numbers, and stuff like that?

The exact formula you need depends on the number of metrics you want to display. For example, if you want to display five axes (= five metrics), your formula will differ from the one you use for a six-axis chart. In my case, I used a 12-axis chart, so I had to use several formulas as seen in the image above.

Thanks to the Internet, I was able to find the different formulas to create calculations in Tableau for the X axis and the Y axis. Here’s what they look like:

Calculation for [Xaxis]

case [Dimension]

when "Member 1" then 0

when "Member 2" then [Value] *(1/2)

when "Member 3" then [Value] *(sqrt(3)/2)

when "Member 4" then [Value]

when "Member 4" then [Value] *(sqrt(3)/2)

when "Member 5" then [Value] *(1/2)

when "Member 6" then 0

when "Member 7" then [Value] *(-1/2)

when "Member 8" then [Value] *(-sqrt(3)/2)

when "Member 9" then [Value] *(-1)

when "Member 10" then [Value] *(-sqrt(3)/2)

when "Member 11" then [Value] *(-1/2)

end

Calculation for [Yaxis]

case [Dimension]

when "Member 1" then [Value]

when "Member 2" then [Value]*(sqrt(3)/2)

when "Member 3" then [Value]*(1/2)

when "Member 4" then 0

when "Member 5" then ([Value])*(-1/2)

when "Member 6" then [Value]*(-sqrt(3)/2)

when "Member 7" then [Value]*(-1)

when "Member 8" then [Value]*(-sqrt(3)/2)

when "Member 9" then [Value]*(-1/2)

when "Member 10" then 0

when "Member 11" then [Value]*(1/2)

when "Member 12" then [Value]*(sqrt(3)/2)

end

It is very important to have the same [Value] scale for each [Dimension] member. Indeed, the 12 axes have to be the same. In my case, the scale was from 0 to 100.

## Build the radar to detect everything

After the calculations comes time to build the chart. To do this, I just have to drag and drop the [Yaxis] on the rows shelf and the [Xaxis] on the columns shelf.

Note that I use the aggregation average (because sum will return the wrong results). Here, I have only one point.

To create the radar, I have to use several dimensions—in my case, [Country] and [IndexType]. The [IndexType] dimension allows me to draw 12 axes because this is a dimension with 12 members. The [Country] dimension allows me to draw one radar by country.

If I want to draw the average radar chart, I can remove the [Country] field. To have several points, I add [IndexType] on the Mark shelf as a Level of Detail.

Then I can change the Mark to draw a polygon and add [Country] as a quick filter.

The last steps involve assigning [IndexType] as a path to follow, and fixing the axis between -110 and 110 (or whatever range you’d like to set to provide enough space between the borders and the chart).

## Some formatting, and voilà!

In my case, I made a few tweaks for the sake of design. I chose to remove the grid lines, the zero lines, and the borders. I hid the headers. At the same time, I added a border to my polygon and made the color more transparent.

Finally, I drew a background image to have a reference axis. I think it is better if you know where the maximum is.

To style the tooltip, it is important to put AVG([Value]) on the Mark shelf and to configure the tooltip like this:

And voilà! The radar chart is done!

## Comments

Hi Johnathan, a very interesting post, thank you.

I noticed that you have two number 4 members in the x axis calculation which is probably just a typo. Also it would be great if you could overlay the trigonometry diagram with the member numbers so we can see which position each formula relates to.

One last idea this gives me is to add in a label for each point / member as just looking at the shape you cannot tell what is doing better than another unless you then go an hover over each point. This would not work for the overview chart but you could then use this as a filter action for a bigger version.

Hi Johnathan,

This is a great post! Really helpful.

What if the [Value] is not in the same scale? How do I change them into one scale? by Normalization?

Thanks!

Why can't Tableau do the math for me and offer a Radar / Spider Chart? I still don't get it.

Thanks for this post- very helpful! I have a stupid question: when adding the background image, how do you calculate the X and Y bounds of the background image? When I enter the x- and y-coordinates based off of my template (-1.1, 1.1) and (-1.1, 1.1), they do not line up correctly.

This is a great great post. I'm trying to replicate it using 5 dimensions but I am not able to "replicate" the polygon when I assign "path to follow" on the very last step.

Any suggestions where I might be mistaken?

Thanks a lot

Great article but bad feedback from the author or Tableau about user comments. Fail.

You don't have to precompute all those sines and cosines.

Let Tableau do it. E.g. for 10 values:

Calculated field x:

case [Dimension]

WHEN 'Value1' then SIN(0)

WHEN 'Value2' then SIN(2*PI()/10)

WHEN 'Value3' then SIN(2*2*PI()/10)

WHEN 'Value4' then SIN(3*2*PI()/10)

WHEN 'Value5' then SIN(4*2*PI()/10)

WHEN 'Value6' then SIN(5*2*PI()/10)

WHEN 'Value7' then SIN(6*2*PI()/10)

WHEN 'Value8' then SIN(7*2*PI()/10)

WHEN 'Value9' then SIN(8*2*PI()/10)

WHEN 'Value10' then SIN(9*2*PI()/10)

END

and the same for y just replace SIN with COS.

And then you can use it for multiple measures. Simply create

MeasureX = Measure * x

MeasureY = Measure * y

David, wherever you are... you are beautiful. You just saved me A LOT of time!

Hi David,

Thank you for your great insight. Is it possible to put down more details around how you can use this methodology for multiple measures? Do you have an example to share, please?

Thank you in advance!

Hi Oksana,

It doesn't look like I can post anything here, so I posted it to https://community.tableau.com/thread/231259

hope it helps

Hi David,

Thank you for posting your example. This is very great!

Do you have any points on how to display two or more measures on the same axis chart? I'm not sure if it's even possible with Tableau spider chart work-around, but this is so easy in excel. How would I go about if I want to display the same measure but for different time periods on the same chart? What if I need to display a measure and a target/benchmark for comparison on the same spider chart? Any help will be greatly appreciated!

Oksana

Hi Oksana,

I think most people would agree that Tableau is not the best tool to create spider charts :).

If you really need them, perhaps you can use excel?

I know I'm not being helpful :), but the only reason I created that chart in the first place is because our business partners were so enamored of them. In the end we didn't use it, and I moved on to do other things, I haven't touched it since.

David

However, just like Andres, I stumbled on the last step. In my case the Polygon doesn't follow the order.

Any help is appreciated.

Never mind, I figured it out, they values have to be in alphabetical order.

Thanks for posting this solution. Helped me very much!

Thanks very much!. Helped me

Hi Jonathan,

I am new to tableau. came across a requirement to create radar chart. I am able to create in excel.

Data as 9 measures and I want to create radar chart. Do you have any sample example for this?

Thanks in advance.

Regards,

Bipin

Hi Jonathan,

Thanks for this chart type. Your method is incredibly inventive.

How did you get the axes to cross at 0? I haven't discovered that feature in Tableau. Would you help me with the solution please? I need to cross two axes of equal length cross at their mid-points.

Thanks in advance.

Regards.

Hi!

Thanks for this guide. One qustion I have is how to draw the background?

I guess there are several options. I tried to do it in paint, which doesn't work very well. Would there be a way of doing it directly in Tableau?

BR, Julian

What if all your dimensions are listed across the row instead of down? So instead of a field name dimension with different types of dimensions in it, there's fields for each dimension in the row.

are you a lecturer? can I be your student, so I better understand the plot method of spider, radar chart.

## Add new comment