<script>

	var	P_valeur	= <?php echo($AQCM05_P); ?>;
	var	P_color		= '<?php echo($AQCM05_P_color); ?>';
	var	P_mini 		= <?php echo($P_mini); ?>;
	var	P_maxi 		= <?php echo($P_maxi); ?>;
 
	var P_config = {
		
		type: 'doughnut',
		
		data: {
			datasets: [{
				data: [ P_valeur - P_mini, P_maxi - P_valeur ],
				backgroundColor: [P_color, gauges_inactive_ring_color],
				borderColor: '#000000',
				borderWidth: gauges_line_width
			}]
		},
		
		options: {
			
			radius: gauges_radius,
			cutout: gauges_cutout,
			layout: {
				padding: {
					left: 6,
					right: 6
				}
			},
			
			responsive: true,
			maintainAspectRatio: false,
			rotation: -90,
			circumference: 180,
			
			animation: {
				animateRotate: false,
				animateScale: false
			},
			
			plugins: {

				tooltip: {
					enabled: false
				},
				
				annotation: {
					annotations: {
						labelMin: {
							content: [P_mini],
							type: 'label',
							xValue: 0,
							xAdjust: mini_x_adjust,
							yValue: 0,
							yAdjust: mini_y_adjust,
							color: gauges_text_color,
							backgroundColor: gauges_background_color,
							font: [{size: mini_maxi_font_size, weight: 'normal'}, {family: 'Arial'}],
						},
						labelMax: {
							content: [P_maxi],
							type: 'label',
							xValue: 0,
							xAdjust: maxi_x_adjust,
							yValue: 0,
							yAdjust: maxi_y_adjust,
							color: gauges_text_color,
							backgroundColor: gauges_background_color,
							font: [{size: mini_maxi_font_size, weight: 'normal'}, {family: 'Arial'}],
						},
						labelValue: {
							content: [P_valeur],
							type: 'label',
							textlign: 'center',
							xValue: 0,
							xAdjust: value_x_adjust,
							yValue: 0,
							yAdjust: value_y_adjust,
							color: gauges_text_color,
							backgroundColor: gauges_background_color,
							font: [{size: 26, weight: 'normal'}, {family: 'Arial'}],
						},
						labelTitle: {
							content: ['Patm'],
							type: 'label',
							xValue: 0,
							xAdjust: title_x_adjust,
							yValue: 0,
							yAdjust: title_y_adjust,
							color: gauges_text_color,
							backgroundColor: gauges_background_color,
							font: [{size: title_font_size, weight: 'normal'}, {family: 'Arial'}],
						},
						labelUnit: {
							content: ['hPa'],
							type: 'label',
							xValue: 0,
							xAdjust: unit_x_adjust,
							yValue: 0,
							yAdjust: unit_y_adjust,
							color: gauges_text_color,
							backgroundColor: gauges_background_color,
							font: [{size: unit_font_size, weight: 'normal'}, {family: 'Arial'}],
						},
					}
				}
			}
		}
		

		
	};

	var P_chartCtx = document.getElementById('gauge_P').getContext('2d');
	var gauge_P = new Chart(P_chartCtx, P_config);

</script>
