Radar chart: I can see you...
Trigonometry, my best friend ever!
"Unit circle angles color" by Jim.belk - Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons.
Well... It is important to use it to create axis and it depends on number of metrics you want to display. Indeed, if you want to display 5 axis (= 5 metrics) you have to use differents formulas than 6 axis chart. In my case I used a 12 axis chart so I had to use several formulas (as on the image above).
Thanks to Internet I was able to find the different formulas and create a calculation in Tableau for X axis and Y axis.
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]
members! Indeed, the 12 axis have to be the same. In my case the scale was from 0 to 100.Build the radar to detect everything
[Yaxis]
on the lines shelf and the [Xaxis]
on the columns shelf.You can note that I use the aggregation Average (because Sum will returns a wrong result). Here I have only 1 point. To create the radar I have to use several dimensions (in my case,
[Country]
and [IndexType]
). The [IndexType]
allows me to draw 12 axis because this is a dimension with 12 members; [Country]
allows me to draw 1 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.After I can change the Mark to draw a polygon and add [Country] as a quick filter.
To have a beautiful radar, the last things to do are put [IndexType] as a Path to follow and Fix axis between -110 and 110 (or whatever you want to have enough space between borders and chart).
Some Formatting and "VoilĂ "!
Finally, I drew a background image to have reference axis in order to give some visual impact. Indeed, I think it is better if you know where the maximum is.
To add beautiful tooltips, 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!
Thank you for the reading!