diff --git a/.DS_Store b/.DS_Store index 034166d..5b3a61b 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/graph.js b/graph.js index f3c0c5a..f20c677 100644 --- a/graph.js +++ b/graph.js @@ -187,15 +187,15 @@ var rect = layer.selectAll("rect") var Offset = document.getElementById("graphSteak").offsetTop; - var pos=parseInt(data[0].length-(event.pageY-Offset-margin.top-300)/(height/yStackMax)); + var pos=parseInt(data[0].length-(event.pageY-Offset-margin.top-320)/(height/yStackMax)); var line=parseInt((event.pageX-parseFloat($("body").css('margin-left'))-margin.left)/(x.rangeBand()+1.2)-1.5); console.log(line); $("line").remove(); var myLine = d3.selectAll(".mysteak").append("svg:line") .attr("x1", margin.left) - .attr("y1", event.pageY-Offset-295) + .attr("y1", event.pageY-Offset-322) .attr("x2", width*32/30) - .attr("y2", event.pageY-Offset-295) + .attr("y2", event.pageY-Offset-322) .style("z-index",-1) .style("stroke", "grey"); //console.log(d3.event.pageX-parseFloat($("body").css('margin-left'))); @@ -205,7 +205,7 @@ console.log(line); ttip.html(toF(parseFloat(data[line][pos])).toFixed(2)+ "\xB0F") } else{ ttip.html(parseFloat(data[line][pos]).toFixed(2)+ "\xB0C")} - // ttip.html(line.toFixed(2)+ "\xB0C") + // ttip.html(pos.toFixed(2)+ "\xB0C") ttip.style("opacity", 1) .style("left", (d3.event.pageX-parseFloat($("body").css('margin-left'))+10) + "px") diff --git a/perfectSteak.js b/perfectSteak.js index a96b616..76893c6 100644 --- a/perfectSteak.js +++ b/perfectSteak.js @@ -19,13 +19,25 @@ var perfectSteak = function (div) { var timeStep = 15; var inputTable = $(".inputTable"); + var toC = function (F) { + return ((5 / 9) * (F - 32)); + } var importRecipes=function(){ - var saved=[{"name":"15 seconds flip for 10 minutes","data":[[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300]],"Temp":73}, - {"name":"5 minutes a side","data":[[300,300,73],[300,73,300],[300,73,73]],"Temp":73}, - {"name":"sous-vide","data":[[3600,140,140],[60,300,73],[60,73,300]],"Temp":73}]; + var saved=[{"name":"Heston Blumenthal","data":[[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[15,73,300],[15,300,73],[300,73,73]],"Temp":73}, + {"name":"4 minutes a side","data":[[240,300,73],[240,73,300],[300,73,73]],"Temp":73}, + {"name":"America's Test Kitchen","data":[[15,450,73],[15,73,450],[300,225,225],[900,73,73]],"Temp":73}, + {"name":"Nathan Mhyrvold","data":[[3600,125,125],[30,-321,-321],[60,390,390]],"Temp":73}]; for (var i=0;i<3;i++){ var name=saved[i]["name"]; var data=saved[i]["data"]; + + + for(var n=0;n