mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									8ad6c61891
								
							
						
					
					
						commit
						db1f6092bf
					
				
					 1 changed files with 34 additions and 1 deletions
				
			
		|  | @ -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, | ||||
| 						}, | ||||
| 					 }, | ||||
| 				 } | ||||
| 			 }); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue