Example of Custom Sorting in Javascript (ES5) Pivot Table Control

/
/
Custom Sorting

This sample demonstrates ordering used-defined member(s), aka header name(s), of specific field in row and column axes in ascending or descending order.

More Details...

Sum of In Stock
Sum of Units Sold
Sum of Sold Amount
Product Categories (All)
Year
Order Source
Field:
Headers:
France, United States
Order:
Description

In this sample, any field from the Field dropdown list and its member(s), aka header name(s), from the Headers dropdown list can be ordered ascending or descending. It is possible to achieve this by setting the enableSorting property to true, as well as the field name, sort order, and member(s) (which can be in any order) inside the pivot table's sortSettings property. The dataSourceSettings includes enableSorting and sortSettingsproperties. More information on the custom sorting can be found in this documentation section.