check if stats are loaded before redraw chart
parent
81fd0486e3
commit
c98996a8c5
|
@ -89,13 +89,15 @@ SprintGraphDirective = ->
|
|||
element = angular.element($el)
|
||||
|
||||
$scope.$on "resize", ->
|
||||
redrawChart(element, $scope.stats.days)
|
||||
redrawChart(element, $scope.stats.days) if $scope.stats
|
||||
|
||||
$scope.$on "taskboard:graph:toggle-visibility", ->
|
||||
$el.parent().toggleClass('open')
|
||||
|
||||
# fix chart overflow
|
||||
timeout(100, -> redrawChart(element, $scope.stats.days))
|
||||
timeout(100, ->
|
||||
redrawChart(element, $scope.stats.days) if $scope.stats
|
||||
)
|
||||
|
||||
$scope.$watch 'stats', (value) ->
|
||||
if not $scope.stats?
|
||||
|
|
Loading…
Reference in New Issue