updated drawChart function to pull values directly from json