 
   Link: class extends Backbone.Model
     initialize: =>
-      @view = D3.sankey.view
+      @view = @get 'view'
       @series = @view.series
       @left  = @view.node_map[@get('left')]
       @right = @view.node_map[@get('right')]

    selectedLinkOpacity = 0.5
    hoverLinkOpacity = 0.9

    node_mouseover: ->
      klass = $(this).attr('data-id')
      d3.selectAll(".link")
        .filter((d) -> !d.connects(klass))
        .transition()
        .duration(200)
        .style("opacity", unselectedLinkOpacity)

      else
        k = @key
      @node_map = {}
      @node_list = _.map D3.sankey.charts[k].data.nodes, (n) =>
        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()

    # this method is called when we first render the chart. It is called if we
