examples/binary_tree.js
function(r, n) {
  /* the Raphael set is obligatory, containing all you want to display */
  var set = r.set().push(
    /* custom objects go here */
    r.rect(n.point[0]-30, n.point[1]-13, 50, 50)
    .attr({"fill": "#fa8", "stroke-width": 2, r: 9}))
    .push(r.text(n.point[0], n.point[1] + 15, n.id)
          .attr({"font-size":"20px"}));
          return set;
}
function(r, n) {
  /* the Raphael set is obligatory, containing all you want to display */
  var set = r.set().push(
    /* custom objects go here */
    r.rect(n.point[0]-30, n.point[1]-13, 50, 50)
    .attr({"fill": "#fa8", "stroke-width": 2, r: 9}))
    .push(r.text(n.point[0], n.point[1] + 15, n.id)
          .attr({"font-size":"20px"}));
          return set;
}
function ( r , n ) { /* the Raphael set is obligatory, containing all you want to display */ var set = r . set ( ) . push ( /* custom objects go here */ r . rect ( n . point [ 0 ] - 30 , n . point [ 1 ] - 13 , 50 , 50 ) . attr ( { "fill" : "#fa8" , "stroke-width" : 2 , r : 9 } ) ) . push ( r . text ( n . point [ 0 ] , n . point [ 1 ] + 15 , n . id ) . attr ( { "font-size" : "20px" } ) ) ; return set ; }
Custom render function, to be used as the default for every node
Custom render function to be used as the default for every node