Draw the bar graph dymamically