<script type="text/javascript">


	FS_CO2 = <?php echo($FS_MAX_CO2); ?> ;
	if ( FS_CO2 > 2000 ) {
		CO2_step_size = 200;
	} else {
		CO2_step_size = 100;
	}

	//------------------------------------------------------
	// affichage initial
	//------------------------------------------------------
	{
		trigger_display 	= true;
		FS_max				= false;
		tooltip_enabled 	= false;
		borderWidth_value 	= <?php echo($p_graphs_line_width); ?>;
	}
	
	//------------------------------------------------------
	// lignes de TRIGGER
	//------------------------------------------------------
	{
		
		trig_width = 4.0 ;
		
trig_line_T		=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_T);     ?> -  <?php echo($FS_MIN_T)  ;    ?> ) ;
trig_line_HR 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_HR);    ?> -  <?php echo($FS_MIN_HR)  ;   ?> ) ;
trig_line_CO2 	=  ( trig_width / (10.0 * <?php echo($height_charts);       ?>) ) * ( <?php echo($FS_MAX_CO2);   ?> -  <?php echo($FS_MIN_CO2);    ?> ) ;
trig_line_P_mer	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_P_mer); ?> -  <?php echo($FS_MIN_P_mer);  ?> ) ;
trig_line_COV 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_COV);   ?> -  <?php echo($FS_MIN_COV)  ;  ?> ) ;
trig_line_PM 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_PM);    ?> -  <?php echo($FS_MIN_PM);     ?> ) ;
trig_line_HCHO 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_HCHO);  ?> -  <?php echo($FS_MIN_HCHO);   ?> ) ;
trig_line_LUX 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_LUX);   ?> -  <?php echo($FS_MIN_LUX);    ?> ) ;
trig_line_SPL 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_SPL);   ?> -  <?php echo($FS_MIN_SPL);    ?> ) ;
trig_line_NOX 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_NOX);	 ?> -  <?php echo($FS_MIN_NOX);    ?> ) ;

trig_line_SPL_peak 	=  ( trig_width / (10.0 * <?php echo($height_charts_small); ?>) ) * ( <?php echo($FS_MAX_SPL_peak);   ?> -  <?php echo($FS_MIN_SPL_peak);    ?> ) ;

	}

	//------------------------------------------------------
	// COULEURS
	//------------------------------------------------------
	{
		
		MIN_backgroundColor 		= '#00ff0040'	;
		MOY_backgroundColor 		= '#0000ff20'	;
		MAX_backgroundColor 		= '#ff000040'	;

		ANNOTATION_BOX_color		= '#c0c080c0' 	;
		
		color_of_grids				= '#bbbbbb';
		
		COV_IAQ_border_color		= '#000000ff' 	;
		COV_IAQ_backgroundColor		= '#ffff00ff' 	;

		PRES_border_color			= '#000000ff' 	;
		PRES_backgroundColor 		= '#000000FF'	;

		MIN_border_color			= '#000000ff' 	;
		MIN_above_color 			= '#ddeeff80'	;
		MIN_below_color 			= '#60708080'	;

		MOY_border_color			= '#000000ff' 	;
		MOY_backgroundColor_2		= '#00ff00E0'	;
		MOY_above_color 			= '#7dcea080'	;
		MOY_below_color 			= '#00800044'	;

		MAX_border_color			= '#000000ff' 	;
		MAX_above_color 			= '#ff000080'	;
		MAX_below_color 			= '#00800044'	;

		TICKS_color					= '#000000ff' 	;

		LEGEND_box_color			= '#000000FF' 	;

		TRIG_backgroundColor		= '#00000080' 	;
		TRIG_color_0				= '#00ff00c0' 	;
		TRIG_color_1				= '#FFFF00c0' 	;
		TRIG_color_2				= '#FFa000B0' 	;
		TRIG_color_3				= '#FF0000B0' 	;
		TRIG_color_4				= '#ff00ffB0' 	;
		TRIG_color_5				= '#00ffffB0' 	;

		GRAPH_SEUIL_lines_borderColor 		= '#000000ff'	;
		GRAPH_SEUIL_lines_backgroundColor	= '#000000ff'	;
		
	}

	//------------------------------------------------------
	// courbes
	//------------------------------------------------------
	graphs_line_width = <?php echo($p_graphs_line_width); ?> ;
	
	//------------------------------------------------------
	// fonts
	//------------------------------------------------------
	TICKS_font_size_x			= 11		 	;
	TICKS_font_size_y			= 14		 	;

	//------------------------------------------------------
	// dimensions
	//------------------------------------------------------
	LEGEND_box_width			= 8 	;
	LEGEND_box_height			= 2 	;

	//------------------------------------------------------
	// placement de l'axe Y à gauche
	//------------------------------------------------------
	{
		OPTIONS_SCALES_Y_padding_array	= [50, 20, 17, 13, 8, 3] ;
		
		OPTIONS_SCALES_Y_padding_index_CO2 = 4;
		if ( <?php echo($FS_MAX_CO2); ?> >= 10000 ) {
			OPTIONS_SCALES_Y_padding_index_CO2 = 5;
		}

		OPTIONS_SCALES_Y_padding_index_P = 3;
		if ( <?php echo($FS_MAX_P_mer); ?> >= 1000 ) { OPTIONS_SCALES_Y_padding_index_P = 4; }

		OPTIONS_SCALES_Y_padding_index_PM = 2;
		if ( <?php echo($FS_MAX_PM); ?> >= 100 ) { OPTIONS_SCALES_Y_padding_index_SPL = 3; }

		OPTIONS_SCALES_Y_padding_index_HCHO = 2;
		if ( <?php echo($FS_MAX_HCHO); ?> >=  100 ) { OPTIONS_SCALES_Y_padding_index_HCHO = 3; }
		if ( <?php echo($FS_MAX_HCHO); ?> >= 1000 ) { OPTIONS_SCALES_Y_padding_index_HCHO = 4; }

		OPTIONS_SCALES_Y_padding_index_LUX = 3;
		if ( <?php echo($FS_MAX_LUX); ?> >=  1000 ) { OPTIONS_SCALES_Y_padding_index_LUX = 4; }
		if ( <?php echo($FS_MAX_LUX); ?> >= 10000 ) { OPTIONS_SCALES_Y_padding_index_LUX = 5; }

		OPTIONS_SCALES_Y_padding_index_SPL = 2;
		if ( <?php echo($FS_MAX_SPL); ?> >= 100 ) { OPTIONS_SCALES_Y_padding_index_SPL = 3; }

		OPTIONS_SCALES_Y_padding_index_SPL_peak = 2;
		if ( <?php echo($FS_MAX_SPL_peak); ?> >= 100 ) { OPTIONS_SCALES_Y_padding_index_SPL_peak = 3; }

		OPTIONS_SCALES_Y_padding_index_NOX_IAQ = 2;
		if ( <?php echo($FS_MAX_NOX); ?> >=  100 ) { OPTIONS_SCALES_Y_padding_index_NOX_IAQ = 3; }

	}

	//------------------------------------------------------

</script>

