Cleanup updateElements()
This commit is contained in:
parent
0e3bbbb05a
commit
7c1a66d492
|
@ -529,16 +529,11 @@ function createLineGraph(containerId, raceData){
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateElements(){
|
function updateElements(){
|
||||||
|
|
||||||
//scale the path axis
|
|
||||||
focus.selectAll(".pathLines").call(xAxis);
|
|
||||||
|
|
||||||
//update the data!!
|
//update the data!!
|
||||||
focus.selectAll(".pathLines").attr("d", lineDataDefinition);
|
focus.selectAll(".pathLines").attr("d", lineDataDefinition);
|
||||||
focus.selectAll(".pitstopdot").attr("cx", function(d, i) {return x(d.lap) });
|
focus.selectAll(".pitstopdot").attr("cx", function(d, i) {return x(d.lap) });
|
||||||
focus.selectAll(".endpointdot").attr("x", function(d, i) { return x(d.lap) - rectSize * 1/2; });
|
focus.selectAll(".endpointdot").attr("x", function(d, i) { return x(d.lap) - rectSize * 1/2; });
|
||||||
|
//Update xAxis
|
||||||
//Update x-axis
|
|
||||||
focus.select(".axis--x").call(xAxis);
|
focus.select(".axis--x").call(xAxis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue