## Radar Charts in Tableau – part 1

Tableau is a very powerful tool, but there are some things that it either doesn’t do, or is very difficult to do. Sometimes, the skill is knowing the difference – is something just plain hard, or is it impossible?

Personally, I like a challenge. So when a client asked me if it was possible to create a Spider Diagrams (one of the many alternative names for a Radar Chart) in Tableau, responding with “no” just didn’t sit right with me. Not natively, perhaps, but it must be possible..

## The aim

What is a Radar Chart? A radar chart shows data in a cyclic manner, overlaid on a spoke-and-web design (hence the ‘Spider’)

These are fairly easy in something like Excel, but are not part of the standard chart types in Tableau.

## The method

My first approach was to use a background image. If you haven’t created a chart with a custom background image before, they are fairly simple – you just need to know the bounds on an X-Y scatter plot that the image should be within. As I was styling mine on excel, I did a screengrab of an empty excel version, and so had my background.

For the data, I just created some basic fake information in an excel file. 5 lines of data to create 5 points.

The X and Y coordinates took a little bit of math, after first finding the X-Y coordinates of the end points on the background image, assuming the centre is (0,0).

That was added to the datasource, and then I used Tableau to generate where the relative point would be based on the value of the point as compared to the maximum value on the chart.

Put the Relative X field on Columns, the Relative Y field on Rows, use Line type with the ID of the point as the Path, colour it by the name of the line and there we go.

Almost.

As it’s a cyclic plot, the first and last points are supposed to join up. This works with a polygon, but not with a line chart. Back to the excel, add another data point, same as the first, back to Tableau, refresh and there we go – it works.

To finish off the view, I first added a no-change “Lookup” table calculation, to allow just showing one of the two lines, without changing the max number, and so the positions.

Next thing to do was to add the label. This was made more complicated by the fact that the Tableau v8 layout engine doesn’t overlay labels for two points if they are the same value. This means the start/end point looks a bit odd so we need to use a calculated field to only include the value if it is not the last point on the line

IF LAST()<>0 THEN SUM(Value) END

Put SUM(Result) onto size if you want, but there we have it. A radar chart in Tableau.

## Next Time

We may have now done something in Tableau that would have a good number of people recoiling in horror, but I’m not convinced we should stop here. I will be adding a second post on this topic, where we will try to go that little bit further.

For now though, I will leave you with the workbook so far.

### 19 thoughts on “Radar Charts in Tableau – part 1”

1. This was a helpful post. Thank you!

I worked further on this problem. I created a radar chart template in a Tableau workbook using coordinates that I calculated in R. Here’s my post:

I need to study up on the LOOKUP() approach you took.

I implemented the template and posted an example in my post and up on Tableau public.

1. Andrew Ball says:

Glad you found it useful. I like what you did in R, and especially the extension of the metric lines. I’ve actually ‘borrowed’ that for the next iteration of this, which is due shortly

2. Cyril T says:

Many thanks for this tutorial.

Would be much appreciated to have it implemented in Tableau, but this tutorial may help us in the meantime.

Best regards,

Cyril

1. Andrew Ball says:

I’m not sure it will ever be implemented natively in Tableau – there is just too much wrong with it as a chart type for it to be added. However, that doesn’t mean you don’t get asked to create it, so I’ve put together an improved version (due shortly)

3. rob says:

This is a good tutorial. I was able to use some trigonometry to create the data along the five lines in the graph, then path to create the shape.

However, I’m having trouble putting my path graphs on top of the pentagon gridlines? Is there a tutorial on how to do that?

1. Andrew Ball says:

Glad it was helpful. If you have 5 metrics you could always download my version from Public and use that as your template. Otherwise the Tableau help files have a pretty good walkthrough

4. rob says:

How do you have the graph appear over a background image? Or is the background image coded as a separate path?

1. Andrew Ball says:

As you mention, it’s a background image. As to the separate path option.. you’ll have to wait for that one!

5. Russ says:

At the near last step, “Almost.

As it’s a cyclic plot, the first and last points are supposed to join up. This works with a polygon, but not with a line chart. Back to the excel, add another data point, same as the first, back to Tableau, refresh and there we go – it works.”

WHat do you mean by add another data point? What is the specific point to add in my existing data set?

Thanks!

R

6. syed rizvi says:

Can you record a video or something creating this chart?

because it would be very very helpful

thank you

syedev101@gmail.com

1. Chris Love says:

Hi Syed, We’ll get one of the team to create a video for our youtube channel in the next week on Radar charts. Nice idea, thanks.

7. Lea Beard says:

Thank you for going through the process to work this out. Spider-diagrams are exceedingly useful for environmental chemistry analysis. They may be questionable for other uses – but for looking at the chemical signature of a sampling point few other chart types can come close to being as useful or as meaningful.

Unfortunately, the process you’ve shown is way more difficult than practical for us – other methods of generating them will have to suffice for now. But it would be EXTREEMLY helpful if these could become as easy in Tableau as some of the more standard charts. It would be a game-changer in terms of product adoption by science/environmental industries.

Thanks!

8. Shannon says:

Thanks for your helpful explanation! I’ve been able to re-create all of your steps, but instead for an Octagon shape. However, I ran into trouble when adding the background image. I have a stupid question: 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. Thanks again!