 
         loadDataTable("#dc-data-table", wards)
         loadMap("#wpLocations", wards)
+
+        dc.chartRegistry.list().forEach (chart) ->
+          chart.on "filtered", () ->
+            # its important to throttle events here to prevent
+            # countless needless redraws
+            dc.events.trigger () ->
+              onFilteredHandler()
+            , 70
 
         dc.renderAll()
 

        datatable.fnAddData(alldata)
        datatable.fnDraw()

      dc.chartRegistry.list().forEach (chart) ->
        chart.on "filtered", () ->
          dc.events.trigger () ->
            reloadTable()

      if exists
        reloadTable()

    # controller level map object
    map = null

    loadMap = (container, dim) ->
      id = "regionalDashMap"

      if not $('#' + id).length
        e = $('<div id="' + id + '"></div>')
        $(container).append(e)


          map.addWaterpoint(wp)
        map.zoomToMarkers()

      if not exists
        filterHandlers.push(updateMap)

      updateMap()

