added code so web browser automatically displays barchart- code runs but doesnt display barchart