Limit the number of values in pie charts to a top X

A common problem in pie charts is overlapping labels in case of small relative values: the slices tend to collide, particularly above the pie. I intend to limit the number of values to a top-X (configurable), and to create one remaining slice with the sum of all other values that aren’t shown explicitly. Apart from pre-processing the chart’s source data before calling the chart, is there another (standard, built-in, or recommended) way to achieve this?