api for d3js