Viewing file: reporte_grafica_ferias_view.php (4.24 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div class="content-wrapper" style="min-height: 946px;"> <div style="margin-left:20px;"> <section class="content-header"> <h1><?= $titulo ?></h1> <br> </section>
<!-- Main content --> <section class="content">
<div id="container" style="min-width: 300px; height: auto; margin: 0 auto"></div> </section><!-- /.content --> </div><!-- /.content-wrapper -->
<script type="text/javascript">
$(function () { $('#container').highcharts({ chart: { type: 'column' },
title: { text: 'ESTADOS DE LOS PEDIDOS' },
subtitle: { text: 'Cantidad de pedidos por estado' },
legend: { align: 'right', verticalAlign: 'middle', layout: 'vertical' },
xAxis: { categories: ['CANTIDADES'], labels: { x: -10 } },
yAxis: { allowDecimals: false, title: { text: 'CANTIDAD PEDIDOS' } },
series: [ <?php $mensaje=""; $respuesta2=null; $respuesta=$this->consultas_model->getEstadosTotalesPedidosAajax(); $a=0; $i=0; foreach($respuesta as $file): if($a!=0){ $mensaje.=','; } $mensaje .='{'; $mensaje .= "name: "."'".$file['estado']."'".','; $respuesta2=$this->consultas_model->ventasPedidosCantidades($file['id']); $mensaje .= "data:["; $b=0; if($respuesta2 != null){ foreach($respuesta2 as $valor){ if($b!=0) $mensaje .= ','; $mensaje .= $valor['cant']; $b ++; } } $mensaje .= "]"; $mensaje .= "}"; $a ++; $i ++; endforeach;
echo($mensaje); ?> ],
responsive: { rules: [{ condition: { maxWidth: 500 }, chartOptions: { legend: { align: 'center', verticalAlign: 'bottom', layout: 'horizontal' }, yAxis: { labels: { align: 'left', x: 0, y: -5 }, title: { text: null } }, subtitle: { text: null }, credits: { enabled: false } } }] }
}) });
document.onkeydown = function(){ if(window.event && window.event.keyCode == 8){ return false; } if(window.event && window.event.keyCode == 505){ window.event.keyCode = 505; } } </script>
|