Search code examples
bar-charttableau-apicircular-dependencygraph-visualizationdatapoint

Achieving circular bar chart


How to achieve evenly spaced data points in tableau circular bar chart? Current version of this Bar Chart

WINDOW_COUNT(COUNTD([Radial Field])) * (INDEX() - 1)


Solution

  • You need to calculate the angles at which your bars or groups of bars are displayed dynamically, this will be based on the number of groups or bars you have split over 360 degrees with a fixed distance from a center point. It is easiest to do this if you build the x and y axes yourself and set that center to (0,0).

    There is a fantastic article that explains a very elegant solution to making a radar chart in Tableau, although it is not for a circular bar chart, all the math and calculations you need for your question above can be found in it.

    Some things to note:

    • In your image, it looks that you have groups that have three bars in them, when creating your angle calculation make sure you know the Level of Detail(LOD) you want to split your bars or group of bars at.
    • Your distance from the center should be a the same value for all of your groups, so rather than a variable value that radar charts use, just put an integer that aesthetically and concisely spaces your bars.