         goFn: '&?'
         preventClickFn: '='
     link: ($scope,element,attrs) ->
-        #width = (attrs.width or 600)
-        #height = (attrs.height or 600)
         if not attrs.id
             element.attr 'id', 'tpaSankey'
         svg = d3.select('#' + element.attr 'id')
         .append('svg')
-        #svg.attr("width", width)
-        #svg.attr("height", height)
-        updateDiagram = (oldValue,newValue)->
+        updateDiagram = ()->
             svg.selectAll("g").remove()
             nv.addGraph ->
                 chart = nv.models.pieChart()

                         """)
                .style("left", (d3.event.pageX) + "px")
                .style("top", (d3.event.pageY - 28) + "px")
            .on "mouseout", (d) ->
                div.transition()
                .duration(500)
                .style("opacity", 0)

                    d.source.name = gettextCatalog.getString(d.source.name)
                else if d.target.name is 'Other media'
                    d.target.name = gettextCatalog.getString(d.target.name)
                if (d.source.type is "o" and d.target.type is "m" and d.source.name isnt gettextCatalog.getString("Other organisations") and d.target.name isnt gettextCatalog.getString("Other media"))
                    div.html("""#{d.source.name} (#{formatNumber((d.value/d.source.value)*100)}%) → #{d.target.name} (#{formatNumber((d.value/d.target.value)*100)}%)<br/>#{(formatNumber(d.value))} (§#{d.type})
                            <div><i class="fa fa-bar-chart" aria-hidden="true"></i> #{gettextCatalog.getString('Click for Details')}</div>
                         """)
