Table of contents

sortValues

sortValues(axisName:String, type:String, tuple:Array, measure:Object)

[starting from version: 1.4]

Sorts values in a specific row or column in the pivot table.

Parameters

  • axisName – String. The name of the axis to be sorted. It can be 'rows' or 'columns'. In order to define the sorting for numbers in a specific row, put 'rows' as the first parameter. If the API call will define the sorting for a column, put 'columns'.
  • type – String. The type of sorting: 'asc' or 'desc'.
  • tuple – Array. The tuple identifies the column or the row in the table and consists of member’s unique names.
  • measure – Object. Identifies the measure on which sorting will be applied. Has the following properties:
    • uniqueName – String. Unique measure name.
    • aggregation (optional) – String. Measure aggregation type.

Example

flexmonster.sortValues(
	"columns", 
	"asc", 
  	["category.[bikes]", "color.[red]"], 
  	{"uniqueName": "Price"}
);

Check out on JSFiddle.

See also

getSort
sortingMethod
setSort