histogram and bar-chart working