A Donut plot is an alternative to a pie chart, and it is sometimes seen as more visually attractive than a regular pie chart. It also has some space in the middle for presenting a number. There is no out-of-the box donut chart in TIBCO Spotfire®, but if you are in real need of one, you can create it by cleverly configuring a map chart. Thanks to Christophe Verdon of Renault for sharing his creative thinking in the Spotfire® Ideas portal.
Note that while this is an unorthodox configuration of a map chart, the end result is as dynamic as one would expect from any Spotfire visualization – the donut plot responds to filtering, marking, brushlinking with other visualizations, and it can be used as a master-detail visualization.
Now, lets see how to configure the map chart so it becomes a donut plot.
Start by creating a map chart. Typically, you get a default configuration with a map of the world. Then, do the following:
Remove the map background by deactivating it in the Layers control, in the top left part of the map chart.
Open the Properties for the data layer containing your markers (right-click the map and select Properties, go to Layers, select the data layer (which must be a marker layer and not a feature layer) and click Settings). In the Positioning section, make sure positioning is set to Coordinate columns, and then, instead of selecting any columns, just type 1, or any fixed value you like, both for X and Y (as a custom expression). This should render a single marker (make sure "Marker By" is set to "(None)") in the visualization.
Now lets create the pie: In the Shape section of the marker layer settings, select "Pies" and select the measure to control the sector sizes with. Also, in the Colors section, select what categorical column that should define the sectors. Take the time to name this layer "Pie" or something else, to distinguish it from the next layer we are going to create. To make your pie bigger, use the slider in the Size section of the layer properties and adjust the size to your liking.
You should now have something like this:
At this point, we have something that looks like a pie chart, but we will now turn it into a donut by adding another marker layer with a single white marker on top of the pie. Add the new marker layer using the same technique for positioning as for the first layer, but let it be a normal marker layer, without the Pies shape. Name it "Disk", or something else that lets you distinguish it from the pie layer. Set its color to white. Remove any column on the Size axis, and manually adjust the size using the slider, until it has the appropriate size to give the apperance of a donut.
If you want to show a number in the center of the Donut, add a label column and select Center labels on items. Note that you can concatenate text and values in the label by using a custom expression such as: "Total Sales: " & Sum([Sales])
Now, it is essentially just some tidying up left; configuring the legend, removing the Layers control, the Interaction mode control, the Navigation control, the scale, etc., and then you have your Donut chart.
I attach the .DXP file I created for this article to the post. Hope you find this useful, and let me know if there are comments and questions.