adds chart from api data