1 /**
  2  * Initializes and creates the root {@link D3RaphaelSelection} for the specified
  3  * Raphael Paper.
  4  *
  5  * @example
  6  * var paper = new Raphael(document.body, 300, 200);
  7  * var d3_raphael_selection = d3.raphael(paper);
  8  *
  9  * @see <a href="http://raphaeljs.com/reference.html#Raphael">Raphael</a>
 10  * @see <a href="http://raphaeljs.com/reference.html#Paper">Raphael.Paper</a>
 11  *
 12  * @param {Raphael.Paper} paper
 13  * @return {D3RaphaelSelection} a selection of the root Raphael.Paper element
 14  *
 15  * @function
 16  * @namespace
 17  */
 18 d3.raphael = function(paper) {
 19     var root = new D3RaphaelRoot(paper);
 20 
 21     return d3_raphael_selection([[root.paper]], root)
 22 };
 23 
 24