js/line_chart.js
/* Draws the initial blank line chart. */
Draws the initial blank line chart.
Draws the initial blank line chart .
drawLineChart() {
        let that = this;
        let lineChartWrapper = d3.select("#line_chart_wrapper");
        lineChartWrapper.append("svg")
            .attr("id", "line_chart_svg");
        let yearAxisScale = d3.scaleLinear().domain([1961, 2014]).range([that.margin.left, that.width]).nice();
        let yearAxis = d3.axisBottom().scale(yearAxisScale).tickFormat(d3.format("d"));
        d3.select("#line_chart_svg")
            .append("g")
            .attr("id", "yearAxis")
            .attr("transform", "translate(0," + (that.height + that.margin.top) + ")")
            .call(yearAxis);
    }
drawLineChart ( ) { let that = this ; let lineChartWrapper = d3 . select ( "#line_chart_wrapper" ) ; lineChartWrapper . append ( "svg" ) . attr ( "id" , "line_chart_svg" ) ; let yearAxisScale = d3 . scaleLinear ( ) . domain ( [ 1961 , 2014 ] ) . range ( [ that . margin . left , that . width ] ) . nice ( ) ; let yearAxis = d3 . axisBottom ( ) . scale ( yearAxisScale ) . tickFormat ( d3 . format ( "d" ) ) ; d3 . select ( "#line_chart_svg" ) . append ( "g" ) . attr ( "id" , "yearAxis" ) . attr ( "transform" , "translate(0," + ( that . height + that . margin . top ) + ")" ) . call ( yearAxis ) ; }
Draws the initial blank line chart.
Draws the initial blank line chart .
// Create x axis