code: function(type, pos, dim, canvas){
        var ctx = canvas.getCtx(), 
            c1x = pos.x, 
            c1y = pos.y - dim, 
            c2x = c1x - dim, 
            c2y = pos.y + dim, 
            c3x = c1x + dim, 
            c3y = c2y;
        ctx.beginPath();
        ctx.moveTo(c1x, c1y);
        ctx.lineTo(c2x, c2y);
        ctx.lineTo(c3x, c3y);
        ctx.closePath();
        ctx[type]();
      }
docs: /*
  Method: render
  
  Renders a triangle into the canvas.
  
  Parameters:
  
  type - (string) Possible options are 'fill' or 'stroke'.
  pos - (object) An *x*, *y* object with the position of the center of the triangle.
  dim - (number) The dimension of the triangle.
  canvas - (object) A <Canvas> instance.
  
  Example:
  (start code js)
  NodeHelper.triangle.render('stroke', { x: 10, y: 30 }, 40, viz.canvas);
  (end code)