 
 
 
-        updateDiagram = (oldValue,newValue)->
+        updateDiagram = ()->
             svg.selectAll("g").remove()
             height = Math.max 500, $scope.data.nodes.length*20
             h = height + margin.top + margin.bottom

                .rotateLabels(setAttribute 'rotateLabels',0)
                .showControls(setAttribute 'showControls',false)
                .groupSpacing(0.1)
                #.showLabels(true)
                #.showLegend(setAttribute 'showLegend',true)
                #chart.tooltipContent $scope.tooltipFn() if angular.isDefined $scope.tooltipFn
                #svg.datum($scope.data)
                svg.datum(dummy)
                .call(chart)
                #d3.selectAll('.nv-slice')
                #.on 'click', (e) ->
                #    nv.tooltip.cleanup()
                chart
        $scope.$watch 'data', updateDiagram, true


                    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>
                         """)
