<?php

  session_start();
  include('../../../php/conn_2.php');
  if(!isset($_SESSION["id"])){
    header('Location: index.php');
  }

  mysqli_query($enlace, "SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");
  mysqli_query($enlacehost, "SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");
?>

<!DOCTYPE html>
<html lang="es">
  <head>

  </head>

  <body>
  	<div class="">
  		<div class="row">
  			<div class="col-md-12 col-sm-12 col-xs-12">
  				<div class="x_panel">
  					<div class="x_title">
	                    <h2 style="font-size: 13px">
	                        INFORME DE RESULTADOS PARA TP Y TPF
	                    </h2>
	                    <!-- <ul class="nav navbar-right panel_toolbox">
	                      <li>
	                        <a class="collapse-link">
	                          <i class="fa fa-chevron-up">
	                          </i>
	                        </a>
	                      </li>
	                    </ul> -->
	                    <div class="clearfix"></div>
                  	</div>
                  	<div class="x_content">

                  		<!-- Armar la estructura de la presentación de gráficos -->
                  		<?php
                  			$query = "SELECT presentacion_orden FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' ORDER BY presentacion_orden";

                  			if ($resultado = mysqli_query($enlace, $query)) {
                  				if (mysqli_num_rows($resultado) > 0) {
                  					while($row = mysqli_fetch_assoc($resultado)) {
                  						echo '<div id="presentacion'.$row["presentacion_orden"].'" style="height:350px;">';
                  						echo '</div>';
                  					}
                  				}

              					mysqli_free_result($resultado);
							}
              			?>

					</div>
              	</div>
            </div>
		</div>
  	</div>

  	<!-- <div id="mainb" style="height:350px;">
							
	</div> -->

    <?php echo "Esto es una prueba de recarga. Tabla: ".$_GET["tabla_resultados"].", Encuesta: ".$_GET["cod_encuesta"].", Año: ".$_GET["anho"].", Mes: ".$_GET["mes"].", Filtros: ".$_GET["filtros"]; ?>

    <!-- ECharts -->
    <!-- <script src="../vendors/echarts/dist/echarts.min.js"></script>
    <script src="../vendors/echarts/map/js/world.js"></script> -->

    <!-- Custom Theme Scripts -->
    <!-- <script src="../build/js/custom.min.js"></script> -->

    <script type="text/javascript">
    	var theme_a={color:["#96D7AC","#A7D1EB","#207245","#D9645D","#1D94BF","#9A89AD","#F2C42E","#88DC24","#826C88","#000000"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_b={color:["#08734E","#553B8C","#EF6527","#008FCC","#1A2A40","#E8487A","#E8487A","#bfd3b7"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_c={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_d={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_e={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_f={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_g={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

	   	var theme_h={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};

		var theme_i={color:["#08734E","#08734E","#08734E","#08734E","#08734E","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#553B8C","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527","#EF6527", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#008FCC", "#1A2A40"],
				   title:{itemGap:8,textStyle:{fontWeight:"normal",color:"#408829"}},
				   dataRange:{color:["#1f610a","#97b58d"]},
				   toolbox:{color:["#408829","#408829","#408829","#408829"]},
				   tooltip:{backgroundColor:"rgba(0,0,0,0.5)",
				   axisPointer:{type:"line",lineStyle:{color:"#408829",type:"dashed"},
				   crossStyle:{color:"#408829"},
				   shadowStyle:{color:"rgba(200,200,200,0.3)"}}},
				   dataZoom:{dataBackgroundColor:"#eee",
				   fillerColor:"rgba(64,136,41,0.2)",
				   handleColor:"#408829"},
				   grid:{borderWidth:0},
				   categoryAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   valueAxis:{axisLine:{lineStyle:{color:"#408829"}},
				   splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},
				   splitLine:{lineStyle:{color:["#eee"]}}},
				   timeline:{lineStyle:{color:"#408829"},
				   controlStyle:{normal:{color:"#408829"},emphasis:{color:"#408829"}}},
				   k:{itemStyle:{normal:{color:"#68a54a",color0:"#a9cba2",
				   lineStyle:{width:1,color:"#408829",color0:"#86b379"}}}},
				   map:{itemStyle:{normal:{areaStyle:{color:"#ddd"},
				   label:{textStyle:{color:"#c12e34"}}},
				   emphasis:{areaStyle:{color:"#99d2dd"},
				   label:{textStyle:{color:"#c12e34"}}}}},
				   force:{itemStyle:{normal:{linkStyle:{strokeColor:"#408829"}}}},
				   chord:{padding:4,itemStyle:{normal:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}},
				   emphasis:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"},
				   chordStyle:{lineStyle:{width:1,color:"rgba(128, 128, 128, 0.5)"}}}}},
				   gauge:{startAngle:225,endAngle:-45,axisLine:{show:!0,lineStyle:{color:[[.2,"#86b379"],[.8,"#68a54a"],[1,"#408829"]],width:8}},
				   axisTick:{splitNumber:10,length:12,lineStyle:{color:"auto"}},
				   axisLabel:{textStyle:{color:"auto"}},
				   splitLine:{length:18,lineStyle:{color:"auto"}},
				   pointer:{length:"90%",color:"auto"},
				   title:{textStyle:{color:"#333"}},
				   detail:{textStyle:{color:"auto"}}},textStyle:{fontFamily:"Arial, Verdana, sans-serif"}};


   		// Se define de manera estática un número considerable de posibilidades (del 1 al 10)
   		if(document.getElementById("presentacion1")){
			var a=echarts.init(document.getElementById("presentacion1"),theme_a);
		}

		if(document.getElementById("presentacion2")){
			var b=echarts.init(document.getElementById("presentacion2"),theme_b);
		}
   		
   		if(document.getElementById("presentacion3")){
			var c=echarts.init(document.getElementById("presentacion3"),theme_c);
		}

		if(document.getElementById("presentacion4")){
			var d=echarts.init(document.getElementById("presentacion4"),theme_d);
		}
		
   		if(document.getElementById("presentacion5")){
			var e=echarts.init(document.getElementById("presentacion5"),theme_e);
		}
		
   		if(document.getElementById("presentacion6")){
			var f=echarts.init(document.getElementById("presentacion6"),theme_f);
		}
		
   		if(document.getElementById("presentacion7")){
			var g=echarts.init(document.getElementById("presentacion7"),theme_g);
		}
		
   		if(document.getElementById("presentacion8")){
			var h=echarts.init(document.getElementById("presentacion8"),theme_h);
		}
		
   		if(document.getElementById("presentacion9")){
			var i=echarts.init(document.getElementById("presentacion9"),theme_i);
		}
		
		// Asignando los datos para cada gráfico
		// Obteniendo datos de cabecera
		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 1";

  			$presentacion_titulo = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion = $row["cod_tipopresentacion"];
  						$grupoindicador = $row["cod_grupoindicador"];
  						$origen_crucedatos = $row["origen_crucedatos"];
  						$origen_componente = $row["origen_componente"];
  						$componente_criteriodatos = $row["componente_criteriodatos"];
  						$presentacion_orden = $row["presentacion_orden"];
  						$presentacion_titulo = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 2";

  			$presentacion_titulo2 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion2 = $row["cod_tipopresentacion"];
  						$grupoindicador2 = $row["cod_grupoindicador"];
  						$origen_crucedatos2 = $row["origen_crucedatos"];
  						$origen_componente2 = $row["origen_componente"];
  						$componente_criteriodatos2 = $row["componente_criteriodatos"];
  						$presentacion_orden2 = $row["presentacion_orden"];
  						$presentacion_titulo2 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo2 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 3";

  			$presentacion_titulo3 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion3 = $row["cod_tipopresentacion"];
  						$grupoindicador3 = $row["cod_grupoindicador"];
  						$origen_crucedatos3 = $row["origen_crucedatos"];
  						$origen_componente3 = $row["origen_componente"];
  						$componente_criteriodatos3 = $row["componente_criteriodatos"];
  						$presentacion_orden3 = $row["presentacion_orden"];
  						$presentacion_titulo3 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo3 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 4";

  			$presentacion_titulo4 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion4 = $row["cod_tipopresentacion"];
  						$grupoindicador4 = $row["cod_grupoindicador"];
  						$origen_crucedatos4 = $row["origen_crucedatos"];
  						$origen_componente4 = $row["origen_componente"];
  						$componente_criteriodatos4 = $row["componente_criteriodatos"];
  						$presentacion_orden4 = $row["presentacion_orden"];
  						$presentacion_titulo4 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo4 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 5";

  			$presentacion_titulo5 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion5 = $row["cod_tipopresentacion"];
  						$grupoindicador5 = $row["cod_grupoindicador"];
  						$origen_crucedatos5 = $row["origen_crucedatos"];
  						$origen_componente5 = $row["origen_componente"];
  						$componente_criteriodatos5 = $row["componente_criteriodatos"];
  						$presentacion_orden5 = $row["presentacion_orden"];
  						$presentacion_titulo5 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo5 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 6";

  			$presentacion_titulo6 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion6 = $row["cod_tipopresentacion"];
  						$grupoindicador6 = $row["cod_grupoindicador"];
  						$origen_crucedatos6 = $row["origen_crucedatos"];
  						$origen_componente6 = $row["origen_componente"];
  						$componente_criteriodatos6 = $row["componente_criteriodatos"];
  						$presentacion_orden6 = $row["presentacion_orden"];
  						$presentacion_titulo6 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo6 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 7";

  			$presentacion_titulo7 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion7 = $row["cod_tipopresentacion"];
  						$grupoindicador7 = $row["cod_grupoindicador"];
  						$origen_crucedatos7 = $row["origen_crucedatos"];
  						$origen_componente7 = $row["origen_componente"];
  						$componente_criteriodatos7 = $row["componente_criteriodatos"];
  						$presentacion_orden7 = $row["presentacion_orden"];
  						$presentacion_titulo7 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo7 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 8";

  			$presentacion_titulo8 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion8 = $row["cod_tipopresentacion"];
  						$grupoindicador8 = $row["cod_grupoindicador"];
  						$origen_crucedatos8 = $row["origen_crucedatos"];
  						$origen_componente8 = $row["origen_componente"];
  						$componente_criteriodatos8 = $row["componente_criteriodatos"];
  						$presentacion_orden8 = $row["presentacion_orden"];
  						$presentacion_titulo8 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo8 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT cod_tipopresentacion, cod_grupoindicador, origen_crucedatos, origen_componente, componente_criteriodatos, presentacion_orden, presentacion_titulo, presentacion_subtitulo FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 9";

  			$presentacion_titulo9 = '...';

  			if ($resultado = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($resultado) > 0) {
  					while($row = mysqli_fetch_assoc($resultado)) {
  						$tipopresentacion9 = $row["cod_tipopresentacion"];
  						$grupoindicador9 = $row["cod_grupoindicador"];
  						$origen_crucedatos9 = $row["origen_crucedatos"];
  						$origen_componente9 = $row["origen_componente"];
  						$componente_criteriodatos9 = $row["componente_criteriodatos"];
  						$presentacion_orden9 = $row["presentacion_orden"];
  						$presentacion_titulo9 = str_replace('"', '', $row["presentacion_titulo"]);
  						$presentacion_subtitulo9 = str_replace('"', '', $row["presentacion_subtitulo"]);
  					}
  				}

				mysqli_free_result($resultado);
			}

			//$presentacion_titulo = "Hola";
		?>

		// Obteniendo Datos
		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 1) ORDER BY seriex_orden";

			$legend = "";
			$series = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion == 2){
							$noestotal = '';

							if ($componente_criteriodatos != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend = substr($legend, 0, -2);
  					$series = substr($series, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 2) ORDER BY seriex_orden";

			$legend2 = "";
			$series2 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend2 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion2 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion2 == 2){
							$noestotal = '';

							if ($componente_criteriodatos2 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos2."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series2 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend2 = substr($legend2, 0, -2);
  					$series2 = substr($series2, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 3) ORDER BY seriex_orden";

			$legend3 = "";
			$series3 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend3 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion3 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion3 == 2){
							$noestotal = '';

							if ($componente_criteriodatos3 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos3."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series3 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend3 = substr($legend3, 0, -2);
  					$series3 = substr($series3, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 4) ORDER BY seriex_orden";

			$legend4 = "";
			$series4 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend4 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion4 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion4 == 2){
							$noestotal = '';

							if ($componente_criteriodatos4 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos4."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series4 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend4 = substr($legend4, 0, -2);
  					$series4 = substr($series4, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 5) ORDER BY seriex_orden";

			$legend5 = "";
			$series5 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend5 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion5 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion5 == 2){
							$noestotal = '';

							if ($componente_criteriodatos5 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos5."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series5 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend5 = substr($legend5, 0, -2);
  					$series5 = substr($series5, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 6) ORDER BY seriex_orden";

			$legend6 = "";
			$series6 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend6 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion6 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion6 == 2){
							$noestotal = '';

							if ($componente_criteriodatos6 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos6."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series6 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend6 = substr($legend6, 0, -2);
  					$series6 = substr($series6, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 7) ORDER BY seriex_orden";

			$legend7 = "";
			$series7 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend7 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion7 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion7 == 2){
							$noestotal = '';

							if ($componente_criteriodatos7 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos7."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series7 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend7 = substr($legend7, 0, -2);
  					$series7 = substr($series7, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 8) ORDER BY seriex_orden";

			$legend8 = "";
			$series8 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend8 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion8 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion8 == 2){
							$noestotal = '';

							if ($componente_criteriodatos8 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos8."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series8 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend8 = substr($legend8, 0, -2);
  					$series8 = substr($series8, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		<?php
  			$query = "SELECT seriex_etiqueta, seriex_codpregunta, valor_campo, es_total FROM tb_Indicadores_PresentacionPersonalizada WHERE cod_presentacion = (SELECT Id FROM tb_Indicadores_Presentacion WHERE cod_encuesta = '".$_GET["cod_encuesta"]."' AND presentacion_orden = 9) ORDER BY seriex_orden";

			$legend9 = "";
			$series9 = "";
  			
  			if ($res_legend = mysqli_query($enlace, $query)) {
  				if (mysqli_num_rows($res_legend) > 0) {
  					while($row_legend = mysqli_fetch_assoc($res_legend)) {
  						$legend9 .= '"'.$row_legend["seriex_etiqueta"].'", ';


	  					$filtros = '';

	  					if(isset($_GET["filtros"])){
						  if(strlen($_GET["filtros"]) > 0){
						    $filtros = " AND ".$_GET["filtros"];

						    $filtros = str_replace("%", " ", $filtros);
						  }
						}

	  					if ($tipopresentacion9 == 1){
							$query = "SELECT ROUND(AVG(`".$row_legend["seriex_codpregunta"]."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$filtros." ";
						}

						if ($tipopresentacion9 == 2){
							$noestotal = '';

							if ($componente_criteriodatos9 != $row_legend["seriex_codpregunta"]){
								$noestotal = "AND ".$row_legend["seriex_codpregunta"]." = '".$row_legend["valor_campo"]."' ";
							}

							$query = "SELECT ROUND(AVG(`".$componente_criteriodatos9."`) * 100, 1) AS total FROM ".$_GET["tabla_resultados"]." WHERE cod_anho = '".$_GET["anho"]."' AND cod_mes = ".$_GET["mes"]." ".$noestotal." ".$filtros." ";
						}

	  					if ($res_series = mysqli_query($enlace, $query)) {
	  						if (mysqli_num_rows($res_series) > 0) {
	  							while($row_series = mysqli_fetch_assoc($res_series)) {
	  								$estotal = '';

	  								if ($row_legend["es_total"] == 1){
	  									$estotal = 'markLine:{data:[{type:"max",}]},';
	  								}

	  								$series9 .= '{name:"'.$row_legend["seriex_etiqueta"].'",
	  											type:"bar",
	  											data:['.$row_series["total"].'],
	 		 		 			  				markPoint:{data:[{type:"max"}]},'.$estotal.'
	 		 		 			  				label:{normal: {show: true,
															    position:"insideBottom",
															    distance:-20,
															    align:"middle",
															    verticalAlign:"middle",
															    rotate:45,
															    fontSize: 16,
															    textStyle: { color: '."'#000000'".'},
															    formatter:'."'".$row_legend["seriex_etiqueta"]."'".',
															    rich: {name: {textBorderColor: "#000000"}}
															    }}
					    	  	 				}, ';
	  							}
	  						}

	  						mysqli_free_result($res_series);
	  					}
  					}

  					$legend9 = substr($legend9, 0, -2);
  					$series9 = substr($series9, 0, -2);  					
  				}

				mysqli_free_result($res_legend);
			}

			//$presentacion_titulo = "Hola";
		?>

		// Pintando eChart
		if(document.getElementById("presentacion1")){
			a.setOption({title:{text:"<?php echo $presentacion_titulo; ?>",
						 subtext:"<?php echo $presentacion_subtitulo; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
		 		 		 series:[<?php echo $series; ?>]
	  					});
		}

		if(document.getElementById("presentacion2")){
			b.setOption({title:{text:"<?php echo $presentacion_titulo2; ?>",
						 subtext:"<?php echo $presentacion_subtitulo2; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend2; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
		 		 		 series:[<?php echo $series2; ?>]
	  					});
		}

		if(document.getElementById("presentacion3")){
			c.setOption({title:{text:"<?php echo $presentacion_titulo3; ?>",
						 subtext:"<?php echo $presentacion_subtitulo3; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend3; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
		 		 		 series:[<?php echo $series3; ?>]
	  					});
		}

		if(document.getElementById("presentacion4")){
			d.setOption({title:{text:"<?php echo $presentacion_titulo4; ?>",
						 subtext:"<?php echo $presentacion_subtitulo4; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend4; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
		 		 		 series:[<?php echo $series4; ?>]
	  					});
		}

		if(document.getElementById("presentacion5")){
			e.setOption({title:{text:"<?php echo $presentacion_titulo5; ?>",
						 subtext:"<?php echo $presentacion_subtitulo5; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend5; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
					 		 series:[<?php echo $series5; ?>]
							});
		}

		if(document.getElementById("presentacion6")){
			f.setOption({title:{text:"<?php echo $presentacion_titulo6; ?>",
						 subtext:"<?php echo $presentacion_subtitulo6; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend6; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
					 		 series:[<?php echo $series6; ?>]
							});
		}

		if(document.getElementById("presentacion7")){
			g.setOption({title:{text:"<?php echo $presentacion_titulo7; ?>",
						 subtext:"<?php echo $presentacion_subtitulo7; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend7; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
					 		 series:[<?php echo $series7; ?>]
							});
		}

		if(document.getElementById("presentacion8")){
			h.setOption({title:{text:"<?php echo $presentacion_titulo8; ?>",
						 subtext:"<?php echo $presentacion_subtitulo8; ?>"},
						 tooltip:{trigger:"axis"},
						 legend:{data:[<?php echo $legend8; ?>], align: 'left', left: 400},
						 toolbox:{show:!1},
						 calculable:!1,
				 		 xAxis:[{type:"category",
						 		 data:[""]}],
				 		 yAxis:[{type:"value"}],
					 		 series:[<?php echo $series8; ?>]
							});
		}

		if(document.getElementById("presentacion9")){
			i.setOption({title:{text:"<?php echo $presentacion_titulo9; ?>",
			 subtext:"<?php echo $presentacion_subtitulo9; ?>"},
			 tooltip:{trigger:"axis"},
			 legend:{data:[<?php echo $legend9; ?>], align: 'left', left: 400},
			 toolbox:{show:!1},
			 calculable:!1,
	 		 xAxis:[{type:"category",
			 		 data:[""]}],
	 		 yAxis:[{type:"value"}],
		 		 series:[<?php echo $series9; ?>]
				});
		}
    </script>

  </body>
</html>