diff options
author | Chris Schlaeger <chris@linux.com> | 2018-01-21 10:37:22 +0100 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2018-01-21 10:37:22 +0100 |
commit | 48ba3947aef1b671c2cee46433d895134c778352 (patch) | |
tree | dc02a9f2f66755bbc7897cff9de1ac9ae97d4f14 /lib | |
parent | 3f74eac8389a9345473990abdde9eaf1aad8f76f (diff) | |
download | postrunner-48ba3947aef1b671c2cee46433d895134c778352.zip |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/ChartView.rb | 4 |
1 files 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) |