Added the basic chart functionality. Needs to be cleaned up