 
       # The rectangle just cares about its size and color
       #
-      @nodes.append("svg:rect").
+      colors = d3.scale.category20()
+
+      nodes.append("svg:rect").
         attr("stroke", "gray").
         attr("fill", (datum, i) -> colors(i)).
         attr("width", @x @module.Node.width).

      style("opacity", 0).
      text((d) => @format_value d.value())

      # Node elements are grouped inside an svg element, so we can use relative
      # coordinates
      #
      # The container just stores the x and y coordinates
      #
      @nodes = @svg.selectAll("svg.node").
        data(@module.nodes.models, (d) -> d.get('id')).
        enter().
        append("svg").

        append("svg:svg").
        attr("height", @height).
        attr("width", @width)
      @links = @draw_links()
      @nodes = @draw_nodes()

    draw_links: =>
      # links are treated as a group made of a link path and label text element
      #
      links = @svg.selectAll('g.link').
        data(@module.links.models, (d) -> d.cid).
        enter().
        append("svg:g").
