         .valueAccessor((p) -> p.value.functional)
         .stack(group, "Needs Repair", (d) -> d.value["needs repair"])
         .stack(group, "Not Functional", (d) -> d.value["not functional"])
-        .colors(statusColor)
+        .colors(stColor)
         .elasticY(true)
         .elasticX(true)
         .gap(1)

        .stack(group, "Not Functional", (d) -> d.value["not functional"])
        .x(d3.scale.ordinal())
        .xUnits(dc.units.ordinal)
        .colors(statusColor)
        .elasticY(true)
        .elasticX(true)
        .gap(gap || 10)


  .controller 'RegionalDashboardCtrl', ($scope, $http, $q, $filter, Map,
                                        gettext, modalSpinner, populationData) ->
    # should http calls be cached
    # FIXME: should be application level setting
    cacheHttp = false

    # FIXME: create our own statusColor version to prevent weird values
    # from modifying the original one
    stColor = d3.scale.ordinal()
      .domain(statusColor.domain())
      .range(statusColor.range());

    $scope.gridsterOpts =
      margins: [10, 10]
      columns: 12
