// Use a default implementation SlicedCharts.setSliceSorter(SliceSorters.SortByValueDescending) // Use a custom implementation SlicedCharts.setSliceSorter((a, b) =>a.getValue() - b.getValue())
Returns
Number which implies the sorted order between Slices A and B.
For more details, refer to Array documentation.
Type of function which is used to sort Slices of a Chart with Slices. It is a comparator function used with JavaScript API: Array.sort.
See SliceSorters collection for quick access to some example implementations.
Use with setSliceSorter
Example usage:
Returns
Number which implies the sorted order between Slices A and B. For more details, refer to Array documentation.