aboutsummaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-07-07 14:01:36 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-11 06:59:00 -0700
commite5c5ee74f0f9a6312765f4b55c57a244876f3508 (patch)
treee23a9411c231aa4fcbac1c818bb9ffe24f1f324c /theme/list_lib.js
parent266e3a6cdd5b5bc510fa7b4daa3f59be13f0006e (diff)
downloadsubsurface-e5c5ee74f0f9a6312765f4b55c57a244876f3508.tar.gz
HTML: fix profile labels
Fix labels view in dive profile. Add Jqplot css file to the exports. The css files fix the view and enahnce the plot. 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/list_lib.js')
-rw-r--r--theme/list_lib.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 798c40a41..7135369d0 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -788,31 +788,31 @@ function int_to_time(n)
function canvas_draw()
{
document.getElementById("chart1").innerHTML = "";
- var d1 = new Array(); //depth
- var d2 = new Array(); //pressure
- var d3 = new Array(); //events
- var d4 = new Array(); //temperature
+ var depthData = new Array();
+ var pressureData = new Array();
+ var eventsData = new Array();
+ var temperatureData = new Array();
var last = 0;
for (var i = 0; i < items[dive_id].samples.length; i++) {
- d1.push([
+ depthData.push([
items[dive_id].samples[i][0] / 60,
-1 * mm_to_meter(items[dive_id].samples[i][1])
]);
if (items[dive_id].samples[i][2] != 0) {
- d2.push([
+ pressureData.push([
items[dive_id].samples[i][0] / 60,
mbar_to_bar(items[dive_id].samples[i][2])
]);
}
if (items[dive_id].samples[i][3] != 0) {
- d4.push([
+ temperatureData.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([
+ temperatureData.push([
items[dive_id].samples[i][0] / 60,
mkelvin_to_C(last),
]);
@@ -820,16 +820,16 @@ function canvas_draw()
}
}
for (var i = 0; i < items[dive_id].events.length; i++) {
- d3.push([
+ eventsData.push([
items[dive_id].events[i].time / 60,
0,
]);
}
plot1 = $.jqplot('chart1', [
- d1,
- d2,
- d3,
- d4,
+ depthData,
+ pressureData,
+ eventsData,
+ temperatureData,
],
{
grid : {
@@ -886,9 +886,9 @@ function canvas_draw()
tickRenderer : $.jqplot.CanvasAxisTickRenderer,
tickOptions : {
showGridline : false,
- formatString : '%i min',
- angle : -30
- }
+ formatString : '%i',
+ },
+ label:'Time (min)'
},
yaxis : {
max : 0,