Fetching information from a CouchDB and applying D3 graph on it