Skip to Content
avatar image
Former Member

Sorting Individual Segments of Stacked Bar chart in SAPUI5

Hi,

Is there a possibility to sort the individual Bar segments . For example like this:

http://kb.tableausoftware.com/articles/howto/sorting-segments-within-stacked-bars-by-value

Regards

Mayank Jain

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 14, 2015 at 06:32 AM

    Hi Mayank,

            In the Dataset use this

    var oSorter = new sap.ui.model.Sorter("valuetosorton", true);

      var oDataset = new sap.viz.ui5.data.FlattenedDataset({

        dimensions : [{

         axis : 1,

         name : "Levels",

         value : "{level}"

        }],

        measures :   [{

          name : "Value",

          value : "{valuetosorton}"

         }],

        data : {

         path : "/",

         sorter: oSorter

        }

       });

    Sorting would happen on that measure.

    Thank you.

    Regards,

                  Pruthvi.

    Add comment
    10|10000 characters needed characters exceeded