Added comments and fixed a potential issue in the Bar graph.