assets/js/app.js
// function used for updating y-scale var upon click on axis label
function used for updating y-scale var upon click on axis label
function used for updating y - scale var upon click on axis label
function yScale(healthData, chosenYAxis) {
    var yLinearScale = d3.scaleLinear()
      .domain([d3.min(healthData, d => d[chosenYAxis]) * 0.85,
        d3.max(healthData, d => d[chosenYAxis]) * 1.15
      ])
      .range([height, 0]);
    return yLinearScale;
  }
function yScale ( healthData , chosenYAxis ) { var yLinearScale = d3 . scaleLinear ( ) . domain ( [ d3 . min ( healthData , d => d [ chosenYAxis ] ) * 0.85 , d3 . max ( healthData , d => d [ chosenYAxis ] ) * 1.15 ] ) . range ( [ height , 0 ] ) ; return yLinearScale ; }
function used for updating y-scale var upon click on axis label
function used for updating y - scale var upon click on axis label
// create scales