From 1a9c796c12c80985d949f1d695d697160b9e18c3 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 31 Dec 2017 01:03:16 +0100 Subject: [PATCH] Fix tickValues --- js/diagrams.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/diagrams.js b/js/diagrams.js index 0ae0d15..8d399d0 100644 --- a/js/diagrams.js +++ b/js/diagrams.js @@ -45,11 +45,15 @@ function createLineGraph(containerId, raceData){ y = d3.scaleLinear().range([graphPosWidth.height, 0]), y2 = d3.scaleLinear().range([smallGraphPosWidth.height, 0]); - var xAxis = d3.axisBottom(x), + // Gather lapNumbers for xAxis tickvalues + var lapNumbers = []; + for(var i=0; i