You may be able to use the $groupBy argument in PKPStatsService::getOrderedObjects() to get what you want. However, it may be more complicated with individual file types, since you may need to group across multiple columns. It will probably be easier to group by abstracts/files than to group by individual file types.
Oh and I forgot the last step, which is the UI part. Read up on how to implement sorting in a Table component. The StatsPage.vue component should handle including the orderBy param with the API request. But if not, you can investigate the template and the page component.