This sample demonstrates ordering fields in row and column axes either in ascending or descending order.
In this sample, any field can be selected from the
Fields dropdown list and its order can be changed to display headers either in ascending or descending order.
It can be enabled using the
enableSorting property and it can be configured using the
name and
order options inside the
sortSettings property in the pivot table.
More information on the sorting can be found in this documentation section.