Forum Discussion

galvar1975's avatar
galvar1975
Frequent Visitor
7 years ago
Solved

Stacked Bar Chart Order

Hi everyone:

 

I need to sort the legend of a bar chart in a given order. (Below you can see the chart)

 

I need - for example- all black data on the bottom, all yellow data stacked over the black, and so on.

 

 

Here some part of the tables (One with priorities and the other with the data):

 

  • For a stacked bar chart it adds the lowest sort order item to the bottom unless it is negative but since only one category appears as negative and you want that at the bottom anyway that works out.  Then we just set the order for the rest how you want them to stack in the chart.

    We add a column to your priority table that we will use to set the order.

    • Select [Tipo de Despacho]
    • Click "Sort by Column"
    • Click our order column

    Now when you add [Tipo de Despacho] to the legend, add it from the 'Priority' table because that is the one we applied the sort order to.  You will see that they stack from bottom to top based on the order we set.

6 Replies

  • Hi galvar1975 ,

     

    Is the sort order related to the Prioridad column you show on the first image?

     

    If yes you just need to sort the Tipo de Despacho by the Prioridad column and add the Tipo de Despacho to your legend.

     

    However, in the chart, you show since you have negative values they will always go to the bottom of the visual because of their signal.

     

    Regards,

    MFelix

    • galvar1975's avatar
      galvar1975
      Frequent Visitor

      Thanks MFelix 

      Only one category has negative values (Intercambio), that´s why I want it in the bottom.

      Sorting by column does not work.

       

      Regards

      Giovanni

    • MFelix's avatar
      MFelix
      Super User

      Hi galvar1975 ,

       

      Is your legend based on the first table in the image or the second?

       

      Regards,

      MFelix

      • galvar1975's avatar
        galvar1975
        Frequent Visitor

        Hello MFelix 

        I tried with both of them. The result is remain the same.

         

        Regards

        Giovanni