diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2014-07-04 14:37:10 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-04 06:35:38 -0700 |
commit | db1f6092bfe66f0871f0f30bb557c6c8141350f0 (patch) | |
tree | b4a20f69013af17214c97b88c5d69e78cc08c53f /theme | |
parent | 8ad6c61891176ccf8c2027627adcbd4b77745864 (diff) | |
download | subsurface-db1f6092bfe66f0871f0f30bb557c6c8141350f0.tar.gz |
HTML: add temperature curve to profile.
Add temperature curve to profile view, The curve is tracable by mouse.
The temperature has a hidden axis that doesn't appear in the detailed
view.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme')
-rw-r--r-- | theme/list_lib.js | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js index 67e80e4c2..92177dc41 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -898,6 +898,8 @@ function canvas_draw() var d1 = new Array(); var d2 = new Array(); var d3 = new Array(); + var d4 = new Array(); + var last = 0 ; for (var i = 0; i < items[dive_id].samples.length; i++) { d1.push([ items[dive_id].samples[i][0] / 60, @@ -909,6 +911,21 @@ function canvas_draw() mbar_to_bar(items[dive_id].samples[i][2]) ]); } + if (items[dive_id].samples[i][3] != 0) { + d4.push([ + items[dive_id].samples[i][0] / 60, + mkelvin_to_C(items[dive_id].samples[i][3]), + ]); + last = items[dive_id].samples[i][3]; + } + else { + if(last != 0) { + d4.push([ + items[dive_id].samples[i][0] / 60, + mkelvin_to_C(last), + ]); + } + } } for (var i = 0; i < items[dive_id].events.length; i++) { //var x = get_sample(items[dive_id].events[i].time); @@ -921,7 +938,8 @@ function canvas_draw() plot1 = $.jqplot('chart1', [ d1, d2, - d3 + d3, + d4, ], { grid : { @@ -965,6 +983,12 @@ function canvas_draw() markerOptions: { size: 10, style:"o" }, pointLabels: { show:false, } , }, + { + showLine:true, + showMarker : false, + pointLabels: { show:false, } , + yaxis : 'y3axis', + }, ], axes : { xaxis : { @@ -991,6 +1015,15 @@ function canvas_draw() }, pad : 3.05 }, + y3axis : { + padMax : 3.05, + tickOptions: { + showGridline: false, + showMark: false, + showLabel: false, + shadow: false, + }, + }, } }); } |