HospitalCheckup.Behaviors = {
  HospitalSelect: Marionette.Behavior.extend({
    events: {
      "click .bar": "displayHospital",
      "click .range-bar": "displayHospital",
      "click .stat-circle": "displayHospital",
      "click .y.axis text": "displayHospital"
    },

    displayHospital: function(e){
      var data = d3.selectAll(e.currentTarget)[0].__data__;
      if(!data.id){ //clicks on hospital label text won't register ID, tried everything to attach it to DOM but failed
        data = HospitalCheckup.SectionsApp.Section.chartView.collection.findWhere({ display_name: data }).get("id");
      } else {
        data = data.id;
      }
      this.view.trigger("hospital:change", data);
    }
  })
}

Marionette.Behaviors.behaviorsLookup = function(){
  return HospitalCheckup.Behaviors;
}
HospitalCheckup.Behaviors = {
  HospitalSelect: Marionette.Behavior.extend({
    events: {
      "click .bar": "displayHospital",
      "click .range-bar": "displayHospital",
      "click .stat-circle": "displayHospital",
      "click .y.axis text": "displayHospital"
    },

    displayHospital: function(e){
      var data = d3.select(e.currentTarget)[0][0].__data__;
      if(!data.id){ //clicks on hospital label text won't register ID, tried everything to attach it to DOM but failed
        data = HospitalCheckup.SectionsApp.Section.chartView.collection.findWhere({ display_name: data }).get("id");
      } else {
        data = data.id;
      }
      this.view.trigger("hospital:change", data);
    }
  })
}

Marionette.Behaviors.behaviorsLookup = function(){
  return HospitalCheckup.Behaviors;
}
Fix data reference for selecting hospitals
Fix data reference for selecting hospitals

I think this is a d3 change that happened when I updated libraries?
That’s when it broke
