<script>

	TICKS_color					= '#000000ff' 	;
	TICKS_font_size_x			= 10		 	;
	TICKS_font_size_y			= 10		 	;
	color_of_grids				= '#bbbbbb'		;
	MOY_border_color			= '#000000ff' 	;
	
	MOY_backgroundColor 		= '<?php echo($AQCM05_P_color_chart); ?>';

	var ctx_P = document.getElementById('Chart_P').getContext("2d");

	chart_P = new Chart(ctx_P, {
		
		type: 'line',
	  
		data: {
			
			datasets: [
				{
					data: <?php echo $series_chart_js_P_moy; ?>,               
					tension: 0.5,
					pointStyle: false,
					borderWidth: 1,
					borderColor: MOY_border_color,
					backgroundColor: MOY_backgroundColor,
					fill: true
				}			
			]
		},

		options: {
			
			animation: false,
			
			scales: {
				
				x: {
					
					type: 'time',
					
					min: <?php echo 1000 * $start;?>,
					max: <?php echo 1000 * $stop;?>,
					
					time: {
						unit: 'hour',
						displayFormats: {
							hour: 'HH:mm'
						}
					},
					
					
					ticks: {
						
						stepSize: 1,
						labelOffset: 0,
						padding: 0,
						color: TICKS_color,
						autoSkip: false,
						font: {
							size: TICKS_font_size_x,
							weight: 'bold', 
							family: 'Arial',  
							style: 'normal'  
						}
					},
					grid:{
						color: color_of_grids
					},
			
				},
				
				y: {
					
					min: <?php echo($P_min); ?>,
					max: <?php echo($P_max); ?>,
					ticks: {
						color: TICKS_color,
						labelOffset: 0,
						padding: 4,
						autoSkip: true,
						font: {
							size: TICKS_font_size_y,
							weight: 'bold', 
							family: 'Arial',  
							style:  'normal'  
						}
					},
					grid:{
						color: color_of_grids
					},
					
				}
				
			},
			
			plugins: {
				
				legend: {
					display: false
				},
			  
				tooltip: {
					enabled: false
				},

				annotation: {
					annotations: {
						labelTitle: {
							content: [' Pa (hPa)'],
							type: 'label',
							padding: 0,
							xAdjust: -64,
							yAdjust: -50,
							color: '#000000',
							backgroundColor: '#ffffff',
							font: [{size: 12, weight: 'bold'}, {family: 'Arial'}],
						}
					}
				}

			}
			
		}
	  
	});

</script>

