From 48ba3947aef1b671c2cee46433d895134c778352 Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Sun, 21 Jan 2018 10:37:22 +0100 Subject: Fix: Ensure that all time-based graphs always start at 0. Sometimes sensors don't produce values until later in the activity. These graphs then only started at later times and did no longer line up with other graphs. --- lib/postrunner/ChartView.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/postrunner/ChartView.rb b/lib/postrunner/ChartView.rb index badf73c..f3dad86 100644 --- a/lib/postrunner/ChartView.rb +++ b/lib/postrunner/ChartView.rb @@ -337,7 +337,7 @@ EOT #{chart[:colors] ? "color: \"#{chart[:colors]}\"," : ''} lines: { show: true#{chart[:id] == 'pace' ? '' : ', fill: true'} } } ], - { xaxis: { mode: "time" }, + { xaxis: { mode: "time", min: 0.0 }, grid: { markings: lap_marks, hoverable: true } EOT if chart[:id] == 'pace' @@ -417,7 +417,7 @@ EOT " fillColor: \"#{chart[:colors][index][0]}\", " + " fill: true, radius: 2 } }" end.join(', ') - s << "], { xaxis: { mode: \"time\" }, " + + s << "], { xaxis: { mode: \"time\", min: 0.0 }, " + (chart[:id] == 'gct_balance' ? gct_balance_yaxis(data_sets) : '') + " grid: { markings: lap_marks, hoverable: true } });\n" s << lap_mark_labels(chart_id, start_time) -- cgit v1.2.3