Google News
logo
D3.js Interview Questions
Path generator includes
 
* svg.line : Make a new line generator
* svg.line.radial : Make a new radial line generator
* svg.area : Make a new area generator
* svg.chord : Make a new chord generator and so on
The D3.js is data driven and the data () function is used to join the specified array object of data to the selected DOM elements and return updated selection.
 
The data binding methods : 

1.      data() function : This function Joins the data to the selected elements

2.      enter() function : This functions is used to creates a selection with placeholder references for missing elements

3.      exit() function : This functions is used to removes nodes and adds them to the exit selection which can be later removed from the DOM

4.      datum() function : This functions is used to injects data to the selected element without computing a join
 
The Example looks like :
var dataArray = ["Hello,  Ths is data array!"];
    
var selectData = d3.select("body").selectAll("p").data(dataArray)
      .text(function (dt) {   
    return dt;
});