Cleanup updateElements()

This commit is contained in:
Jan Philipp Timme 2017-12-30 23:52:25 +01:00
parent 0e3bbbb05a
commit 7c1a66d492
1 changed files with 5 additions and 10 deletions

View File

@ -529,17 +529,12 @@ function createLineGraph(containerId, raceData){
} }
function updateElements(){ function updateElements(){
//update the data!!
//scale the path axis
focus.selectAll(".pathLines").call(xAxis);
//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);
} }
} }