     .attr("y2", h+1)
     .attr("stroke-width", 2)
     .attr("stroke", "black")
-
 
 
 draw_ahi_graph = () ->



  $(document).on 'click', "[data-object~='calculate-minimum-weight']", () ->
    $("#desired-weight").val minimum_healthy_weight(calculate_height())
    calculate_predicted_ahi_change()
    scatter_pt = calculate_scatter_position()
    output_AHI_change(scatter_pt[0], scatter_pt[1])

get_bmi = (height, weight) ->
  Math.round((weight / (height ** 2)) * 703)

minimum_healthy_weight = (height, bmi) ->
  desired_bmi = calculate_desired_BMI(bmi)
  if desired_bmi==bmi
    return parseFloat($("#my-weight").val())
  else
    Math.round(desired_bmi * (height ** 2) / 703)

calculate_scatter_position = () ->
  old_w = parseFloat($("#my-weight").val())
