layoutRedo/3scriptRestructured.js
//This is the global slider function that targets specific classes
This is the global slider function that targets specific classes
This is the global slider function that targets specific classes
function renderSlider(data) {
    x.domain([parseTime2(1991), parseTime2(2017)]);
    var tickAxis = d3.selectAll(".dateRangeTicks").append('svg')
        .attr('width', width)
        .attr('height', 15)
    var axisx = tickAxis.append('g')
        .attr("transform", "translate(" + margin.left + "," + -3 + ")")
        .attr('class', 'timelineTicks')
        .call(d3.axisBottom(x).ticks(responsive.ticks(data.length)).tickFormat(d3.timeFormat("%y")).tickSize(0));
    axisx.selectAll("line")
        .style("stroke", function() {
            return 'gray'
        })
    var dateRange = d3.selectAll('.dateRange')
    dateRange.style('width', width-margin.left + "px")
    dateRange.style('margin-left', margin.left + 4 + "px")
    dateRange.on("input", function() {
        loopThrough(this.value);
    })
}
function renderSlider ( data ) { x . domain ( [ parseTime2 ( 1991 ) , parseTime2 ( 2017 ) ] ) ; var tickAxis = d3 . selectAll ( ".dateRangeTicks" ) . append ( 'svg' ) . attr ( 'width' , width ) . attr ( 'height' , 15 ) var axisx = tickAxis . append ( 'g' ) . attr ( "transform" , "translate(" + margin . left + "," + - 3 + ")" ) . attr ( 'class' , 'timelineTicks' ) . call ( d3 . axisBottom ( x ) . ticks ( responsive . ticks ( data . length ) ) . tickFormat ( d3 . timeFormat ( "%y" ) ) . tickSize ( 0 ) ) ; axisx . selectAll ( "line" ) . style ( "stroke" , function ( ) { return 'gray' } ) var dateRange = d3 . selectAll ( '.dateRange' ) dateRange . style ( 'width' , width - margin . left + "px" ) dateRange . style ( 'margin-left' , margin . left + 4 + "px" ) dateRange . on ( "input" , function ( ) { loopThrough ( this . value ) ; } ) }
This is the global slider function that targets specific classes
This is the global slider function that targets specific classes
//I'm bringing data into this to access date range for tics // .style('x2', '100') // .style('stroke-width', '.10')