Donut plot in TIBCO Spotfire®
By:
Last updated:
9:41am Apr 24, 2018

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:

  1. Remove the map background by deactivating it in the Layers control, in the top left part of the map chart.

  2. 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.

  3. 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:

  4. 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.

  5. 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])

  6. 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.

Attachments

Feedback (4)

This was very helpful.Thanks for sharing.I could use this method to have several concentric circles too by adding multiple layers.Can area charts or Sankey plots be created too on Spotfire?

 

sukanya.dutta-0 12:56pm May. 29, 2018

Could anyone let me know how to delete the outline for this chart

Manoja.Bodicherla 5:29am Apr. 30, 2018

Good one. Thanks for sharing..

manojbasky 4:35am Mar. 12, 2018

Thanks for sharing this example on doughnut charts.

 

sukanya.dutta-0 3:03pm Feb. 12, 2018