making a Chart class