         sums[column] = sums[column] || 0
         sums[column] += n.value()
       _.max _.values(sums)
+
+    number_of_columns: =>
+      @__column_number ?= d3.max(@node_list, (n) -> n.get 'column') + 1

        offset += n.value() + margin
      offset

    x_offset: => @get('column') * (@width + @horizontal_spacing)

    # center point of the node. We use it as link anchor point
    x_center: => @x_offset() + @width / 2

        node = new D3.sankey.Node(_.extend n, view: this)
        @node_map[n.id] = node
        node

      @link_list = _.map D3.sankey.charts[k].data.links, (l) =>
        new D3.sankey.Link(_.extend l, view: this)
      @initialize_defaults()
