Trying to get chart to work correctly