This commit is contained in:
Maschell 2017-12-31 16:43:15 +01:00
commit 22e6eed503
1 changed files with 3 additions and 3 deletions

View File

@ -413,7 +413,7 @@ function createLineGraph(containerId, raceData){
.attr("width", textMaxLength + "em") .attr("width", textMaxLength + "em")
.attr("height", (textArr.length + 1) + "em") .attr("height", (textArr.length + 1) + "em")
.attr("x", function() { if(xRatio < 0.70) return d3.mouse(this)[0] + 10; else return d3.mouse(this)[0] - 130; }) .attr("x", function() { if(xRatio < 0.70) return d3.mouse(this)[0] + 10; else return d3.mouse(this)[0] - 130; })
.attr("y", function() { return d3.mouse(this)[1] + 10; }); .attr("y", function() { return d3.mouse(this)[1] + 25; });
//Necessary to add Text for each Line //Necessary to add Text for each Line
textArr.forEach((text, textIndex) =>{ textArr.forEach((text, textIndex) =>{
@ -421,7 +421,7 @@ function createLineGraph(containerId, raceData){
tooltipGroup.append("text") tooltipGroup.append("text")
.attr("dy", (textIndex + 1) + "em") .attr("dy", (textIndex + 1) + "em")
.attr("x", function() { if(xRatio < 0.70) return d3.mouse(this)[0] + 15; else return d3.mouse(this)[0] - 125; }) .attr("x", function() { if(xRatio < 0.70) return d3.mouse(this)[0] + 15; else return d3.mouse(this)[0] - 125; })
.attr("y", function() { return d3.mouse(this)[1] + 15; }) .attr("y", function() { return d3.mouse(this)[1] + 30; })
.text(function() { .text(function() {
return text; // Value of the text return text; // Value of the text
}); });
@ -443,7 +443,7 @@ function createLineGraph(containerId, raceData){
textArr = getLapTextArray(raceData,d); textArr = getLapTextArray(raceData,d);
}else if(dataType === elemTypes.pitstoppoint){ }else if(dataType === elemTypes.pitstoppoint){
d3.select(this) d3.select(this)
.attr("r", linePointSize); .attr("r", linePointSize * 1.4);
textArr = getPitStopTextArray(raceData,d); textArr = getPitStopTextArray(raceData,d);
}else if(dataType === elemTypes.endpoint){ }else if(dataType === elemTypes.endpoint){
d3.select(this) d3.select(this)