abstract data for BarChart from Map[S, Y] to D + help functions