add trends graph

and a few fixes: in API implementation