abstracted a Graph class out of the BarChart

For use in future types of graph
added option to create line graph