Forum Discussion

costing's avatar
costing
Frequent Visitor
2 years ago
Solved

How to create a horizontally stacked pyramid chart

How can I create a horizontally stacked pyramid chart like this: 


You can see the left chart has an inverted x-axis range, while the right chart is it normal (increasing to the right).

It is based on a small multiple and having one of the charts have x-axis 'invert range'.  

 

However it doesn't seem I can invert the range for the small multiples independently - or is there a trick to doing it?

Having small multiples means the y-axis labels are always aligned, even with missing data - so the option of using multiple

charts to do this is not a happy approach (I'm using it now while looking for a better solution)

I'm new to Deneb - making a custom visualisation - however I can't seem to get that to work for having the y-axis labels aligned

when there is missing data, so if you can make this work, that would be great, I'm flexible to the solution.

 

 



3 Replies

  • Hi costing 
    We don't have this kind of graph as a free option.
    You can use a tornado chart of PbiVizEdit.
    The link to download :

    https://pbivizedit.com/gallery/tornado

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

     

    • costing's avatar
      costing
      Frequent Visitor

      Hi Ritaf1983 I've tried what you suggested, however I'm not able to control the colours by the legend, is this possible?  (It seems to be based on the link you sent me).

      Here is the image from your link:

      It seems 'Value A' represents the left side stacks.  I'm hoping the legend would be independent of the value column.  

      Here's the data I'm using:

      categorysexage1age2yeary_val
      am152024alpha
      af262024alpha
      bm332024alpha
      bf442024alpha
      cm522024alpha
      cf642024alpha
      am462025beta
      af522025beta
      bm612025beta
      bf322025beta
      cm432025beta
      cf242025beta
      am452026gamma
      bm662026gamma
      cf242026gamma


      I noticed there needs to be two columns for the values, left and right.  I can work around this, although I'd prefer to have just one value column and left/right be distinguished by a binary valued column, e.g. sex in the above example.