implement data mapping to d3 charts

Change-Id: I3bad52e675f1c2c973e45d84ffb2ad215f503517
Reviewed-on: http://review.couchbase.org/31601
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>