This example demonstrates a Donut chart with sorting options.
Pie Other Threshold - Use this chart-level attribute to attribute to aggregate small slices of the chart into an "Other" node. The attribute can be used to specify the smallest slice that will be displayed as a ratio of the total pie value.
Label Position - The series-level attribute is set to Outside Slice, rendering the label on the outside of each slice.
Label Display As - The new series-level attribute is set to Percentage ( Value ), rendering the label in that format, without the need to use custom JavaScript code to acomplish it.
Sort Order - Donut chart slices can be sorted based on the values. The new Sort Order chart-level attribute allows you to define the sort order of your chart. Through the use of Dynamic actions, you can allow your end users to toggle the sort order. Use the Ascending/Descending buttons to the top right of the chart to change the sorting of the data items on the charts.
JavaScript Initialization Code - Use this chart-level attribute to customize the otherColor JET attribute, to set the color of the 'Other' slice of the chart. By default, that slice will use the color black. Use the following code snippet to achieve this:
function (options) {
// Set color of 'Other' slice to pink
$.extend( options.styleDefaults, { otherColor: '#e85d89' }) ;
return options;
}
For more information on the Pie chart sort settings, refer to the Oracle JET Cookbook Pie Chart: Sorting example.