                     .datum(data)
                     .call(chart);
 
-                    nv.utils.windowResize(updateDiagram);
+                    angular.element($window).bind('resize', () ->
+                         updateDiagram()
+                         scope.$digest())
+
+                    #nv.utils.windowResize(updateDiagram)
                     if $scope.events and $scope.events.length > 0
                          drawEvents($scope.events)
-
                     chart
 
           $scope.$watch 'data', updateDiagram, true

'use strict'
app = angular.module 'mean.transparency'

app.directive 'tpaTimeline', ($rootScope) ->
     restrict: 'EA'
     scope:
          data: '='

                         d.value)
                    .staggerLabels(true)
                    .margin(margin)
                    .duration(0)

                    chart.yAxis.tickFormat (d) -> d.toLocaleString $scope.getCurrentLanguage(), {style:"currency",currency:"EUR"}

