build charts from api