From 962882d1c2d91f298486836355eaedc84c643333 Mon Sep 17 00:00:00 2001 From: Damien Gasparina Date: Tue, 22 Dec 2015 16:06:59 +0100 Subject: [PATCH] Fixed issues --- js/dashboard.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/dashboard.js b/js/dashboard.js index 4a3666e..8dc72dc 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -133,7 +133,14 @@ function processCSV(csv, filename) { xValues = getValues(graphs, 'system', 'time'); /* Use time for XAxis */ if (xValues !== null) { - graphs.xAxis = function (xa) { xa.axisLabel('Time').tickFormat(function(d) { return d3.time.format('%Hh %Mm %Ss')(new Date(d)); }) }; + graphs.xAxis = function (xa) { + xa.axisLabel('Time').tickFormat(function(d) { + if (typeof d === 'string') { + return d; + } + return d3.time.format('%Hh %Mm %Ss')(new Date(d)); + }) + }; for (lindex = l_env.dataIn, iindex = 0; lindex < lines.length; lindex++, iindex++) { line = lines[lindex].replace(/"/g, '').split(','); for (cindex = 0; cindex < line.length; cindex++) {