D3.js pie.sort() Function
The pie.sort() function in D3.js is used to sort the data objects based on different properties of data. The comparator function can be used to define the basis on which the sorting would be done. Syntax: pie.sort( compare ) Parameters: This function accepts a single parameter as mentioned above and