
For this week’s community challenge, we’re recreating radar charts using fellow Tableau Ambassador and Visionary, Johan de Groot‘s, map layers technique, which he has blogged about here.
Modelling the data
I provided 3 sets of data in one excel workbook
- Gridlines : a basic template to help build the radial gridlines
- Engagement Survey Data – Filled : for use with the filled area chart radar display
- Engagement Survey Data – Line: for use with the non-filled line chart radar display
The Engagement Survey Data – Line data contains an extra ‘Dummy’ theme which has values that exactly match the values associated to Theme ID 1. This helps ensure the lines ‘join up’ once plotted.
Each Engagement Survey Data needs to be related to the Gridlines data by a custom calculation of 1 = 1

Building the Filled Area Radar Chart
Model the data as described above using the Engagement Survey Data – Filled data set.
Create a new parameter
pArea
string parameter, which can be populated as a list using the Add values from option, and then removing the Whole Company and Benchmark options. Default to Finance

Create the following fields
Angle
([Theme ID]-1) * (2 * PI())
/ ({FIXED: COUNTD([Theme ID])}) + (PI() / 2)
Radius
[Value]
X
[Radius] * COS([Angle])
Y
[Radius] * SIN([Angle])
Point
MAKEPOINT([X],[Y])
Drag Point to the Detail shelf. Change the mark type to Polygon and add Theme ID to the Path shelf.

Set opacity on Colour to 30% and add a black border. Set the the Background Layers (Maps > Background Layers) to show nothing: untick all options. Also remove all map options ( (Maps > Map Options -> uncheck all options.) Remove row/column dividers.

Create a new field
Area to Display
IF Area = ‘Benchmark’ OR [Area] = ‘Whole Company’ OR [Area] = [pArea] THEN [Area] END
and add to Colour. Exclude the Null option that display (right click -> exclude; this will automatically add the pill to the Filter shelf). Adjust colours as required.
Create a new field
Spokes
MAKELINE(
MAKEPOINT(0,0),MAKEPOINT(AVG(COS([Angle])),AVG(SIN([Angle]
)))
)
Add this to the view as a new marks layer (drag onto canvas and drop when you get the option displayed)

This will create a new marks card – add Theme ID to the Detail shelf.

Adjust the size and colour of the spokes as required.
Create a new field
Outer Points
MAKEPOINT(cos([Angle]), Sin([Angle]))
Add this as another marks layer. Change the mark type to circle. Reduce the opacity to 0% and size to as small as possible. Add Themes to the Label shelf.

(If you wish, you can format the text to wrap a bit, by creating
Label – Theme formatted
REPLACE([Themes],” “, “
“)
and putting this on the Label shelf instead

You can adjust the labels using the label alignment options, but you may need to manually move the labels to get them positioned in an acceptable place.
Create a new field
Radar Labels
IF [Theme ID]= 1 AND [Position] <=10 THEN
MAKEPOINT(cos([Angle])*[Position], Sin([Angle]) * [Position]/10)
END
and add as another marks layer and change mark type to circle. Again reduce opacity to 0% and size as small as possible.
Create a new field
Value Axis
IF [Position]%2 = 0 THEN
[Position] * 10 END
and add to the Label field of the Radar Labels marks card as a Continuous dimension (unaggregated green pill)

To add gridlines, create
Grid Lines
IF [Position]<=10 THEN
MAKEPOINT(COS([Angle])*[Position]/10, SIN([Angle]) * [Position]/10)
END
and add as another marks layer. Change the mark type to polygon, and add Position to Detail and Theme ID to Path. Set the colour to pale grey at 5% opacity and add a darker grey border.

Finally add Value to the Tooltip of the original Point map layer marks card and adjust tooltip. Then make all the other may layers ‘disabled’ so the can’t be clicked on.

Show the pArea parameter and change the values to see the areas change. This is now the core ‘filled’ radar, which you can add to a dashboard.
My published instance of this version is here.
Building the bonus radar chart
If you duplicate the sheet for the radar chart you’ve just made, and change the original Points marks card from Polygon to Line, you will find that the lines don’t join up. This is why we need to adjust the source data to introduce a ‘Dummy’ theme with the values that match the first theme.
Model the data as described above using the Engagement Survey Data – Line data set.
Create all the same fields as detailed above, but some are adjusted as follows :
Angle
([Theme ID]-1) * (2 * PI())
/ ({FIXED: COUNTD([Theme ID])}-1) + (PI() / 2)
There is a slight difference here, in that 1 is subtracted from the count of themes, as we don’t want to be counting the ‘Dummy’ theme, otherwise we get an extra ‘spoke’.
Label – Theme Formatted
IF [Theme ID]<> 10 THEN
REPLACE([Themes],” “, “
“)
END
adjusted to only return labels that aren’t related to the Dummy theme.
When you add the Point field as the first map layer, change the mark type to line instead of polygon to get the display below.

Then continue to build as described above. Adjust the colourings and amount of opacity as you see fit.

My published instance is here.
Happy vizzin’!
Donna























































































































































