resolved merge conflict

This commit is contained in:
Marcel 2017-12-22 13:17:10 +01:00
commit f15c62f9a8
1 changed files with 12 additions and 4 deletions

View File

@ -2,8 +2,19 @@
// https://bl.ocks.org/mbostock/3884955 // https://bl.ocks.org/mbostock/3884955
function createLineGraph(containerId, raceData){ function createLineGraph(containerId, raceData){
//console.log(raceData);
// Rough input validation
if(raceData.raceInfo === undefined) {
console.error(["Sorry, that raceData is empty. :-(", raceData]);
return; // early return to avoid errors
} else {
console.log(raceData);
}
var enhancedLapData = processor.getEnhancedLapDataPerDriver(raceData);
// Configuration
var height = 720; var height = 720;
var width = 1080; var width = 1080;
var linePointSize = 5; var linePointSize = 5;
@ -37,9 +48,6 @@ function createLineGraph(containerId, raceData){
x.domain([0, raceData.lapTimes.size]); x.domain([0, raceData.lapTimes.size]);
y.domain([raceData.drivers.length, 1]); y.domain([raceData.drivers.length, 1]);
var enhancedLapData = processor.getEnhancedLapDataPerDriver(raceData);
//console.log(enhancedLapData);
// Adds all lines // Adds all lines
enhancedLapData.forEach((driverLapData, driverIndex) => { enhancedLapData.forEach((driverLapData, driverIndex) => {
//console.log(driverLapData); //console.log(driverLapData);