1 2 Previous Next 17 Replies Latest reply on May 11, 2018 6:07 AM by Simon Runc

    Help in Coxcomb chart

    Dhruv Gupta

      Hi all,

       

      I have a requirement to create the coxcomb chart, i have gone through many post to get idea but not sure on the possible error.

      Any help is highly appreciated, Courtesy Simon Runc

       

      Thanks,

      Dhruv

        • 1. Re: Help in Coxcomb chart
          Dhruv Gupta

          Hi all,

           

               I am looking for something similar to below chart. wherein i could show 3 categories(X category, Y category, Category Total) in each pie slice.

           

              

           

          Thanks,

          Dhruv

          • 2. Re: Help in Coxcomb chart
            Simon Runc

            hi Dhruv,

             

            So this is pretty complicated stuff (...as is often the case with the Genius that is Bora!!)

             

            Your problem here is that you have the compute using set to path for all nested table calculations. Due to the complexity of this, Bora has "nested" different calculations into the X and Y, and they need running over different levels (Addressing and Partitioning). You can change the compute level for each one, when we have nested table calcs in the drop-down on the Edit Table Calc option

             

             

            So you want...

            X = Path(Bin)

            Index = Path (Bin)

            Angle = Month

            Edges = Month

            Number of Slices = Month then Path (Order is important)

            Count = Month

             

            Y is the same...

             

            Hope that helps

            2 of 2 people found this helpful
            • 3. Re: Help in Coxcomb chart
              Dhruv Gupta

              Thanks a lot Simon!! I am unable to express my happiness in words after looking at this Nightingle Rose.

               

              Thanks,

              Dhruv

              • 4. Re: Help in Coxcomb chart
                Dhruv Gupta

                Hi Simon Runc,

                 

                     I tried each of your instruction(even followed all comments on Creating Coxcomb Charts in Tableau | Bora Beran and Coxcomb Chart - YouTube ) to replicate the result but not sure why am i failing; I am getting result similar to what i posted in the original problem statement. There is no other useful youtube video.

                 

                Thanks,

                Dhruv

                • 5. Re: Help in Coxcomb chart
                  Simon Runc

                  hmmm...hard to diagnose!!

                   

                  It's most likely that the Table Calculations, which need to be set up exactly (especially the order on the "Number of Slices")

                   

                  below is a GIF showing how they need to be setup...

                   

                  Nightingale Rose.gif

                   

                  seems to be working!

                  2 of 2 people found this helpful
                  • 6. Re: Help in Coxcomb chart
                    Dhruv Gupta

                    Thanks Simon Runc!! This GIF is quite useful, got the correct result.

                     

                    Thanks,

                    Dhruv

                    • 7. Re: Help in Coxcomb chart
                      Ray Rashid

                      Is there a way to make the wedges stacked instead of overlap?

                       

                      I have created the visual, but I am having trouble to stack them.

                      • 8. Re: Help in Coxcomb chart
                        Simon Runc

                        hi Ray,

                         

                        So the categories (in this example) aren't stacking per-se...

                         

                        We can turn Stacking and Overlay here

                         

                         

                        although this has little affect here. In this method we are actually using Polygons and Paths to "draw" the viz as we'd want it. So the extent of each Category is controlled by it's Radius (which is this calc, changing the UDT Count to a position on a circle)

                         

                         

                        If you look at the data, you can see why each category is plotted how it is....

                         

                         

                        So we can adapt the formulas to create a RUNNING_SUM on the Categories...so the radius get's stacked.

                         

                        So first I created this formula

                        [Radius - Running Sum]

                        RUNNING_SUM([Radius])

                         

                        If we then look in the X and Y calculations

                        we can switch out the [Radius] with our new Running_Sum version. We need to keep this as a separate calculation, as we want to have  a different compute using (we want to use Category) than the other table calcs.

                         

                        So X becomes

                        IIF([Index]=1 OR [Index]=WINDOW_MAX([Index]),0,

                        WINDOW_MAX([Radius - Running Sum])

                        * COS([Angle]+

                        ((([Index]-2)*WINDOW_MAX(2*PI())/([Number of Slices]*99)))))

                         

                        and Y

                        IIF([Index]=1 OR [Index]=WINDOW_MAX([Index]),0,

                        WINDOW_MAX([Radius - Running Sum])

                        * SIN([Angle]+

                        ((([Index]-2)*WINDOW_MAX(2*PI())/([Number of Slices]*99)))))

                         

                        we then need to go into the advanced Table Calc, and get the [Radius - Running Sum] to compute using Category (As we want the radius to be stacked)

                         

                         

                        and do the same for Y

                         

                         

                        and now the marks are stacked (or give the impression of being stacked!). not the new extent of the chart

                         

                        Original (not stacked)

                         

                         

                        Stacked

                         

                        Hope that makes sense...the original version from Bora is pretty complicated, and we've just made it even more so!!

                        1 of 1 people found this helpful
                        • 9. Re: Help in Coxcomb chart
                          Ray Rashid

                          Simon,

                           

                            I actually did this after I did not get a response. BTW, turning on stacked marks did not work, but running_sum with the index calculation is the solution I had used.

                           

                          Thanks

                          • 10. Re: Help in Coxcomb chart
                            Murthy Pidugu

                            Are we able to show Labels for this chart? I am unable to show the labels for CoxCombo chart.. Any help?

                            • 11. Re: Help in Coxcomb chart
                              Stephen Price

                              For everyone visiting this page for instructions on how to recreate this Coxcomb chart I suggest that you carefully read through the comments on Bora's blog post.

                               

                              Find his example in this cookbook:

                              https://public.tableau.com/profile/josh.weyburne#!/vizhome/CookBook/VizCookbook

                               

                              Basically the missing ingredient for me was taking the Path (bin) dimension unto rows and then right clicking to 'Show Missing Values'. Once this is done you will see all values from 1 - 102. Once this is done take this Path (bin) and drop it on Detail for everything else to work nicely.

                               

                              How to take your own data and recreate this chart is where the real challenge is at!

                              • 12. Re: Help in Coxcomb chart
                                Simon Runc

                                hi Murthy,

                                 

                                So the answer is yes, but it's complicated!!

                                 

                                The problem with Labels here is that we are using Densified data to draw the chart (the data only contains 2 path values, 1 and 100, and we are using the Bin "show missing values" to denisfy the points 2 to 99). The marks don't really exist, so we need to get a bit hacky to get to them!

                                 

                                So first we can't add labels from the Polygon type, so we need to duplicate the X (or Y) , and use a mark type which allows labels, create the labels on this (set the mark type to 0%) and then dual axis them.

                                 

                                First I need to create a field which has the Months on every point (including densified points)

                                [Date Label Dense]

                                IF ISNULL(MIN(DATENAME('month', [Date]))) THEN

                                PREVIOUS_VALUE(MIN(DATENAME('month', [Date])))

                                ELSE

                                MIN(DATENAME('month', [Date]))

                                END

                                 

                                Now if I just brought this on as Label we'd get 100 labels per slice, so I've created an index()...you'll see why in a bit

                                [Index For Label]

                                index()

                                 

                                I can now use this Index to "Number " the marks (we can't use the Bin in a formula) and then use this to only create a mark at index()=50 (I chose this as the halfway point for each segment).

                                [Date Label]

                                IF [Index For Label] = 50 THEN [Date Label Dense] END

                                 

                                As there is no ELSE all other, than 50, marks are set to NULL and so won't be plotted.

                                 

                                I set up the Table Calcs as follows

                                 

                                And set up the label as follows

                                 

                                And then once we put it all back together we get

                                 

                                So possible, but tricky!

                                 

                                Hope that helps

                                3 of 3 people found this helpful
                                • 13. Re: Help in Coxcomb chart
                                  Murthy Pidugu

                                  Simon Runc

                                   

                                  I have enclosed the sample data Tableau Workbook of CoxCombo.

                                   

                                   

                                  Can you please review it and kindly help.

                                   

                                   

                                   

                                  1) Tooltips are not showing for entire visualization

                                  2) Want to show Labels for Month & Sum(Total)

                                   

                                   

                                   

                                  Regards,

                                  Murthy Pidugu

                                  • 14. Re: Help in Coxcomb chart
                                    Simon Runc

                                    Here you go.

                                     

                                    So the method is as I described before (in fact we don't need the Max Label Settings, and just keep them to all as you only have one layer, Month, on your chart)

                                     

                                    I just repeated the same for Total.

                                     

                                    I then also added the "Dense" version, created to make the Labels work on the densified points, on the Polygon layer, and used these in the ToolTip, so the ToolTips show wherever on the Viz is hovered.

                                    2 of 2 people found this helpful
                                    1 2 Previous Next