       result
 
     $scope.visualisationData = $scope.calculateAlignmentVisualisation($scope.source)
-
-    $scope.yFunction = () ->
-      (d) ->
-        d[1]
-
-    $scope.xFunction = () ->
-      (d) ->
-        d[0]
-
 )
  replace: true
  restrict: 'E'
  templateUrl: 'units/partials/templates/unit-outcome-alignment.tpl.html'
  controller: ($scope, $filter, currentUser, unitService, alertService, gradeService, LearningAlignments, projectService, taskService) ->

    if $scope.project?
      $scope.source = $scope.project

            alertService.add("danger", "Error: " + response.data.error, 6000)
      )

    xFn = (d) -> d.label
    yFn = (d) -> d.value

    $scope.options = Visualisation 'multiBarChart', {
      clipEdge: yes
      stacked: yes
      height: 440
      width: 600
      margin:
        left: 75
        right: 50
      rotateLabels: 30
      duration: 500
      x: xFn
      y: yFn
      forceY: 0
      showYAxis: no
      # xAxis:
      #   axisLabel: "Outcomes"
        # tickFormat: xAxisTickFormatDateFormat
      # yAxis:
      #   axisLabel: "Tasks Remaining"
        # tickFormat: yAxisTickFormatPercentFormat
      # color: colorFunction
      # legendColor: colorFunction
      # yDomain: [0, ]
      # xDomain: [+new Date($scope.unit.start_date).getTime() / 1000, lateEndDate()]
    }

    $scope.visualisationData = []

    $scope.calculateAlignmentVisualisation = (source) ->
