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