StarterCode/assets/js/app.js
// Function used for updating y-scale variable upon click on axis label.
Function used for updating y-scale variable upon click on axis label.
Function used for updating y - scale variable upon click on axis label .
function yScale(data, chosenYAxis) {
    var yLinearScale = d3.scaleLinear()
        .domain([d3.min(data, d => d[chosenYAxis]) * 0.8,
            d3.max(data, d => d[chosenYAxis]) * 1.2
        ])
        .range([height, 0]);
    return yLinearScale;
}
function yScale ( data , chosenYAxis ) { var yLinearScale = d3 . scaleLinear ( ) . domain ( [ d3 . min ( data , d => d [ chosenYAxis ] ) * 0.8 , d3 . max ( data , d => d [ chosenYAxis ] ) * 1.2 ] ) . range ( [ height , 0 ] ) ; return yLinearScale ; }
Function used for updating y-scale variable upon click on axis label.
Function used for updating y - scale variable upon click on axis label .
// Create Scales.