sort bar categories based on amount of events