split bar graph and pie graph into separate classes. this is working, but needs cleanup