text: $(window).on("load",function(){function t(t){return t.date=i.parse(t.date),t.close=+t.close,t}function e(){l=a.node().getBoundingClientRect().width-n.left-n.right,g.attr("width",l+n.left+n.right),p.attr("width",l+n.left+n.right),d.range([0,l]),p.selectAll(".d3-xaxis").call(s),p.selectAll(".d3-line").attr("d",f)}var a=d3.select("#line-chart"),n={top:20,right:20,bottom:30,left:50},l=a.node().getBoundingClientRect().width-n.left-n.right,r=500-n.top-n.bottom,i=d3.time.format("%d-%b-%y"),d=d3.time.scale().range([0,l]),o=d3.scale.linear().range([r,0]),s=d3.svg.axis().scale(d).orient("bottom"),c=d3.svg.axis().scale(o).orient("left"),f=d3.svg.line().x(function(t){return d(t.date)}).y(function(t){return o(t.close)}),g=a.append("svg"),p=g.attr("width",l+n.left+n.right).attr("height",r+n.top+n.bottom).append("g").attr("transform","translate("+n.left+","+n.top+")");d3.tsv("../../../app-assets/data/d3/line/line.tsv",t,function(t,e){if(t)throw t;d.domain(d3.extent(e,function(t){return t.date})),o.domain(d3.extent(e,function(t){return t.close})),p.append("g").attr("class","d3-axis d3-xaxis").attr("transform","translate(0,"+r+")").call(s),p.append("g").attr("class","d3-axis d3-yaxis").call(c).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".71em").style("text-anchor","end").style("fill","#00BCD4").style("font-size",12).text("Price ($)"),p.append("path").datum(e).attr("class","d3-line").attr("d",f).style("fill","none").style("stroke-width",3).style("stroke","#00BCD4")}),$(window).on("resize",e),$(".menu-toggle").on("click",e)});