<?php ActiveForm::end(); ?> </div> <?php if (isset($modelRelatorio->idrelatorio) && count($valoresContasAReceber) > 0) { HighchartsAsset::register($this)->withScripts(['highstock', 'modules/exporting', 'modules/drilldown']); echo Highcharts::widget([ 'options' => [ 'chart' => [ 'type' => 'column'], 'title' => ['text' => 'Valores recebidos de <b>' . $modelRelatorio->formatarDataDiaMesAno($modelRelatorio->inicio_intervalo) . ' até ' . $modelRelatorio->formatarDataDiaMesAno($modelRelatorio->fim_intervalo)], 'xAxis' => [ 'categories' => ['Data'] ], 'yAxis' => [ 'title' => ['text' => 'Valor(R$)'] ], 'credits' => false, 'series' => $valoresContasAReceber ] ]); } else { ?> <div class="alert alert-warning"> <strong>Informação!</strong> Não há registros de Contas a Receber. </div> <?php }
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0] }, { name: 'London', data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8] }] }); }); </script></div> <!-- http://stackoverflow.com/questions/10817783/using-yii-with-dynamic-data-and-highcharts --> <!-- https://github.com/miloschuman/yii2-highcharts --> <?php echo Highcharts::widget(['options' => ['title' => ['text' => 'Fruit Consumption'], 'xAxis' => ['categories' => ['Apples', 'Bananas', 'Oranges']], 'yAxis' => ['title' => ['text' => 'Fruit eaten']], 'series' => [['name' => 'Jane', 'data' => [1, 0, 4]], ['name' => 'John', 'data' => [5, 7, 3]]]]]); ?> <?php echo Highcharts::widget(['options' => ['title' => ['text' => 'Attendance'], 'xAxis' => ['categories' => ['Present', 'Absent']], 'yAxis' => ['title' => ['text' => 'Number']], 'series' => [['name' => 'Jane', 'data' => [1, 0]], ['name' => 'John', 'data' => [5, 7]]]]]); ?> <!-- http://www.highcharts.com/demo/pie-basic "encode data with json_ecode and use in that in plugin?" to get data into pie chart? http://www.yiiframework.com/forum/index.php/topic/24743-providing-query-data-to-highchart/--> <div> <script language ="javascript">$(function () { $('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: { text: 'Attendance'
<a href="#" id="btn_sql">ชุดคำสั่ง</a> <div id="sql" style="display: none"><?php echo $sql; ?> </div> <div class="col-md-12"> <div class="panel panel-warning"> <div class="panel-heading"> <h3 class="panel-title"><i class="glyphicon glyphicon-signal"></i> ผู้ป่วยความดันที่ควบคุมความดันได้ดี</h3> </div> <div class="panel-body"> <?php //print_r($persent1); echo Highcharts::widget(['options' => ['chart' => ['type' => 'column'], 'title' => ['text' => 'ผู้ป่วยความดันที่ควบคุมความดันได้ดี'], 'xAxis' => ['categories' => $hospname], 'yAxis' => ['title' => ['text' => 'จำนวน(ร้อยละ)']], 'series' => [['name' => 'ร้อยละ', 'data' => $persent1]]]]); ?> </div> </div> </div> <?php if (isset($dataProvider)) { $dev = \yii\helpers\Html::a('DHDC', 'https://www.facebook.com/jub.wifi', ['target' => '_blank']); } //echo yii\grid\GridView::widget([ echo \kartik\grid\GridView::widget(['dataProvider' => $dataProvider, 'responsive' => TRUE, 'hover' => true, 'floatHeader' => true, 'panel' => ['before' => '', 'type' => \kartik\grid\GridView::TYPE_SUCCESS, 'after' => 'โดย ' . $dev], 'columns' => ['hospcode', 'hospname', ['attribute' => 'target', 'header' => 'ผู้ป่วยความดัน(คน)'], ['attribute' => 'result', 'header' => 'ผู้ป่วยความดันที่ควบคุมความดันได้ดี(คน)'], ['class' => '\\kartik\\grid\\FormulaColumn', 'header' => 'ร้อยละ', 'value' => function ($model, $key, $index, $widget) { $p = compact('model', 'key', 'index'); // เขียนสูตร $target = $widget->col(2, $p); if ($target > 0) {
<?php use miloschuman\highcharts\Highcharts; use yii\web\JsExpression; use yii\helpers\Url; ?> <?php $this->registerJs('$.getJSON("' . URL::to(['stat/top-links']) . '", topLink);'); echo Highcharts::widget(['callback' => 'topLink', 'options' => ['chart' => ['type' => 'column'], 'title' => ['text' => Yii::t('app', 'STAT_TOP_LINK')], 'xAxis' => ['type' => 'category', 'labels' => ['rotation' => -45]], 'yAxis' => ['min' => 0, 'title' => ['text' => Yii::t('app', 'STAT_LINK_CLICKING')]], 'legend' => ['enabled' => false], 'plotOptions' => ['series' => ['borderWidth' => '0', 'dataLabels' => ['enabled' => 'true']]], 'series' => [['name' => Yii::t('app', 'STAT_COUNT'), 'colorByPoint' => true, 'data' => new JsExpression('data')]]]]);
><?php echo $value; ?> </option> <?php } ?> </select> </div> <div class="btn-group pull-right" role="group" aria-label="First group"> <!-- <a href="/errors/tracereport.html" class="btn btn-default">返回</a>--> </div> </div> <div class="qys_total_show"> <?php echo Highcharts::widget(['options' => ['chart' => ['type' => 'bar', 'height' => 2800], 'title' => ['text' => $this->title], 'subtitle' => ['text' => ''], 'xAxis' => ['categories' => $category, 'title' => ['text' => '']], 'yAxis' => ['min' => 0, 'title' => ['text' => 'Population (millions)', 'align' => 'high'], 'align' => 'high', 'labels' => ['overflow' => 'justify']], 'tooltip' => ['valueSuffix' => ''], 'plotOptions' => ['bar' => ['dataLabels' => ['enabled' => true]]], 'legend' => ['layout' => 'horizontal', 'align' => 'center', 'verticalAlign' => 'top', 'floating' => true, 'y' => 20, 'borderWidth' => 1, 'backgroundColor' => '#FFFFFF', 'shadow' => true], 'credits' => ['enabled' => false], 'series' => $trace_series]]); ?> </div> <?php } ?> </div> </div> </div> </div> <?php Pjax::end(); ?>
</td> </tr> </tbody> </table> </div> <div class="col-lg-12"> <table class="table table-bordered table-striped table-condensed"> <tbody> <tr> <td><h5>CPU负载信息:</h5></td> </tr> <tr> <td> <h4>CPU负载信息</h4> <?php echo Highcharts::widget(['options' => ['chart' => ['type' => 'spline', 'plotShadow' => true, 'height' => 350], 'title' => ['text' => 'CPU负载信息(%)'], 'xAxis' => ['categories' => $serverstatus['in_country']['categories']], 'yAxis' => ['min' => 0, 'stackLabels' => ['enabled' => true]], 'credits' => ['enabled' => false], 'plotOptions' => ['spline' => ['dataLabels' => ['enabled' => true, 'color' => 'black']]], 'legend' => ['verticalAlign' => "top", 'floating' => true, 'y' => 20], 'series' => $serverstatus['in_country']['cpu']['series']]]); } else { echo '这一天没有对应的数据'; } ?> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </div>
<?php echo yii\jui\DatePicker::widget(['name' => 'endDate', 'language' => 'es-UY', 'dateFormat' => 'dd-MM-yyyy', 'options' => ['placeholder' => 'End Date ...']]); ?> </td> <td> </td> <td> <select id="store-picker" name="storePicker" class="btn btn-sm dropdown-toggle"> <option value="0" selected>Choose Store...</option> <?php echo $stores; ?> </select> </td> <td> </td> <td> <input class="btn btn-default btn-primary btn-sm" type='submit' value='Generate'/> </td> </tr> </table> <br> <?php $comercio = $nomstor; /*$desde='2015-11-24'; $hasta='2015-11-26';*/ echo Highcharts::widget(['options' => ['title' => ['text' => 'Products ordered by the shop ' . $comercio . ' from: ' . $datei . ' to: ' . $datef], 'xAxis' => ['categories' => $prods], 'yAxis' => ['title' => ['text' => 'Order amount']], 'series' => [['type' => 'column', 'name' => 'Amount', 'data' => $pedi, 'dataLabels' => ['enabled' => true, 'rotation' => -90, 'color' => '#FFFFFF', 'align' => 'right', 'y' => 10], 'color' => 'green']]]]); ?> </form> </div>
<h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Create Kalori Table', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'userid', 'YemekName', 'meal', 'Tarih', ['class' => 'yii\\grid\\ActionColumn']]]); ?> <?php $id = 0; $module = 0; $config = 0; $name = Yii::$app->user->identity->username; $sinif = new YemeklerKaloriController($id, $module, $config = []); $sabah = (int) $sinif->actionSabah(); $ogle = (int) $sinif->actionOgle(); $aksam = (int) $sinif->actionAksam(); echo Highcharts::widget(['options' => ['title' => ['text' => 'Günlük Alınan Kalori Grafiği'], 'xAxis' => ['categories' => ['Sabah', 'Öğle', 'Akşam']], 'yAxis' => ['title' => ['text' => 'Kalori Miktarı']], 'series' => [['name' => $name, 'data' => [$sabah, $ogle, $aksam]]]]]); ?> </div>
?> <div class="row"> <div class="col-sm-3"> <?php echo $this->render('_menu'); ?> </div> <div class="col-xs-12 col-sm-6 col-md-9"> <h2> <span><?php echo $this->title; ?> </span> </h2> <hr/> <div class="row"> <div class="container-fluid"> <div class="panel panel-default"> <div class="panel-heading"><strong><?php echo Yii::t('app', 'Monthly Comparative Revenue x Expense'); ?> </strong></div> <div class="panel-body"> <?php echo Highcharts::widget(['options' => ['credits' => ['enabled' => false], 'title' => ['text' => ''], 'colors' => ['#18bc9c', '#e74c3c'], 'xAxis' => ['categories' => $m], 'yAxis' => ['title' => ['text' => '']], 'series' => [['type' => 'column', 'name' => Yii::t('app', 'Revenue'), 'data' => $v1], ['type' => 'column', 'name' => Yii::t('app', 'Expense'), 'data' => $v2]]]]); ?> </div></div> </div> </div> </div> </div>
//Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?> <?php ActiveForm::end(); ?> </div> <div> <?php if (!empty($dataProvider)) { $toolbar = ['{export}']; $lbl2 = ' (' . Yii::$app->formatter->asDate($model->fecdesde) . '-' . Yii::$app->formatter->asDate($model->fechasta) . ')'; $pdfHeader = ['L' => ['content' => \Yii::$app->params['lblName']], 'C' => ['content' => $this->title . $lbl2, 'font-style' => 'B'], 'R' => ['content' => '']]; $pdfFooter = ['L' => ['content' => \Yii::$app->params['lblName2']], 'C' => ['content' => 'página {PAGENO} de {nb}'], 'R' => ['content' => 'Fecha:{DATE d/m/Y}']]; echo '<br/>'; echo GridView::widget(['dataProvider' => $dataProvider, 'options' => ['id' => 'gridStats'], 'condensed' => true, 'showPageSummary' => true, 'layout' => '{toolbar}{items}{pager}', 'export' => ['label' => 'Exportar', 'fontAwesome' => true, 'showConfirmAlert' => true, 'target' => GridView::TARGET_BLANK], 'toolbar' => $toolbar, 'exportConfig' => [GridView::PDF => ['filename' => $this->title, 'config' => ['destination' => 'D', 'methods' => ['SetHeader' => [['odd' => $pdfHeader, 'even' => $pdfHeader]], 'SetFooter' => [['odd' => $pdfFooter, 'even' => $pdfFooter]]], 'options' => ['title' => $this->title, 'subject' => '', 'keywords' => ''], 'contentBefore' => '', 'contentAfter' => '']], GridView::EXCEL => ['filename' => $this->title, 'config' => ['worksheet' => $this->title, 'cssFile' => '']], GridView::CSV => ['filename' => $this->title, 'config' => ['colDelimiter' => ";", 'rowDelimiter' => "\r\n"]]], 'columns' => [['attribute' => 'desc_dia', 'group' => true, 'groupFooter' => function ($model, $key, $index, $widget) { return ['mergeColumns' => [[0, 1]], 'content' => [0 => 'Subtotal (' . $model['desc_dia'] . ')', 2 => GridView::F_SUM, 3 => GridView::F_SUM], 'contentFormats' => [2 => ['format' => 'number', 'decimals' => 0], 3 => ['format' => 'number', 'decimals' => 2, 'decPoint' => ',', 'thousandSep' => '.']], 'contentOptions' => [0 => ['style' => 'font-variant:small-caps;text-align:right'], 2 => ['style' => 'text-align:right'], 3 => ['style' => 'text-align:right']], 'options' => ['class' => 'danger', 'style' => 'font-weight:bold;']]; }], 'concepto', ['attribute' => 'cant', 'hAlign' => 'right', 'pageSummary' => true], ['attribute' => 'porc', 'hAlign' => 'right', 'pageSummary' => true]]]); echo '<div>'; echo Highcharts::widget(['scripts' => ['modules/exporting'], 'options' => ['title' => ['text' => 'Estadistica de accesos (cantidades por Concepto)'], 'xAxis' => ['categories' => $categ], 'yAxis' => ['title' => ['text' => 'Accesos']], 'series' => $series, 'lang' => ['printChart' => 'Imprimir gráfico', 'downloadPNG' => 'Descargar imagen PNG', 'downloadJPEG' => 'Descargar imagen JPEG', 'downloadPDF' => 'Descargar documento PDF', 'downloadSVG' => 'Descargar imagen vectorial SVG', 'contextButtonTitle' => 'Acciones']]]); echo '</div><div>'; echo Highcharts::widget(['scripts' => ['modules/exporting'], 'options' => ['plotOptions' => ['pie' => ['cursor' => 'pointer']], 'title' => ['text' => 'Estadistica de accesos (% por dia)'], 'series' => [$pie], 'lang' => ['printChart' => 'Imprimir gráfico', 'downloadPNG' => 'Descargar imagen PNG', 'downloadJPEG' => 'Descargar imagen JPEG', 'downloadPDF' => 'Descargar documento PDF', 'downloadSVG' => 'Descargar imagen vectorial SVG', 'contextButtonTitle' => 'Acciones']]]); echo '</div>'; } ?> </div> </div>
<?php use miloschuman\highcharts\Highcharts; ?> <div class="abc"> <?php echo Highcharts::widget(['options' => ['chart' => ['type' => 'pie', 'plotShadow' => true, 'renderTo' => 'abc', 'height' => 450], 'title' => ['text' => $text], 'credits' => ['enabled' => false], 'plotOptions' => ['pie' => ['allowPointSelect' => true, 'cursor' => 'pointer', 'dataLabels' => ['enabled' => false], 'showInLegend' => true]], 'legend' => ['verticalAlign' => "bottom"], 'series' => [$date['series']]]]); ?> </div>
// increase Pjax Timeout default 1 sek // Status. if ($model->isOver()) { echo Html::tag('h2', Yii::t('app', 'Status: Finished'), ['class' => 'status status-finished']); } else { if ($model->isOpen()) { echo Html::tag('h2', Yii::t('app', 'Status: Open'), ['class' => 'status status-open']); } else { echo Html::tag('h2', Yii::t('app', 'Status: Not Started'), ['class' => 'status status-closed']); } } // Column chart. if ($model->hasStarted()) { $this->registerJsFile('@web/js/reflowChart.js', ['depends' => \yii\web\JqueryAsset::className(), 'depends' => miloschuman\highcharts\HighchartsAsset::className()]); echo Highcharts::widget(['htmlOptions' => ['id' => 'chartcontainer'], 'options' => ['title' => ['text' => $model->question], 'chart' => ['type' => 'column'], 'plotOptions' => ['column' => ['colorByPoint' => true]], 'colors' => ['#0044CC', '#0088CC', '#51A351', '#F89406', '#BD362F'], 'credits' => ['enabled' => false], 'xAxis' => ['categories' => ArrayHelper::getColumn($dataProvider->getModels(), 'text')], 'yAxis' => ['title' => ['text' => 'Votes'], 'allowDecimals' => false], 'series' => [['name' => 'Votes', 'data' => ArrayHelper::getColumn($dataProvider->getModels(), function ($option) { return intval($option->getValidVotesCount()); }), 'showInLegend' => false]]]]); } // Overview table. $used = $model->getUsedCodesCount(); $unused = $model->getUnusedCodesCount(); $total = $model->getValidCodesCount(); $membersCount = $model->getMembersCount(); $contactsCount = $model->getContactsCount(); $show_total_percentage_columns = false; if ($model->select_min == 1 && $model->select_max == 1) { $show_total_percentage_columns = true; } echo Html::tag('h2', Yii::t('app', 'Overview')); echo DetailView::widget(['model' => $model, 'attributes' => [['label' => Yii::t('app', 'Total Number of Voters'), 'value' => $total], ['label' => Yii::t('app', 'Votes Submitted'), 'value' => $used], ['label' => Yii::t('app', 'Votes Not Yet Submitted'), 'value' => $unused], ['label' => Yii::t('app', 'Total Members Count'), 'value' => $membersCount], ['label' => Yii::t('app', 'Total Contacts Count'), 'value' => $contactsCount], ['label' => Yii::t('app', 'Participation'), 'format' => ['percent', '2'], 'value' => $total > 0 ? $used / $total : 0]]]); // Votes.
<?php use backend\widgets\Panel; use miloschuman\highcharts\Highcharts; use yii\web\JsExpression; $data = array(); foreach ($artikelKomentar as $key => $value) { $data[] = ['name' => $value['judul'], 'data' => [(int) $value['jum_koment']]]; } Panel::begin(['title' => "{$this->title}", 'type' => Panel::TYPE_DEFAULT]); ?> <?php echo \dosamigos\highcharts\HighCharts::widget(['clientOptions' => ['chart' => ['type' => 'column'], 'title' => ['text' => 'Komentar Artikel'], 'xAxis' => ['categories' => ['Judul Artikel']], 'yAxis' => ['title' => ['text' => 'Jumlah Komentar']], 'series' => $data]]); Panel::end(); ?> <?php Highcharts::widget(['scripts' => ['modules/exporting', 'themes/grid-light'], 'options' => ['title' => ['text' => 'Combination chart'], 'xAxis' => ['categories' => ['Apples', 'Oranges', 'Pears', 'Bananas', 'Plums']], 'labels' => ['items' => [['html' => 'Total fruit consumption', 'style' => ['left' => '50px', 'top' => '18px', 'color' => new JsExpression('(Highcharts.theme && Highcharts.theme.textColor) || "black"')]]]], 'series' => [['type' => 'column', 'name' => 'Jane', 'data' => [3, 2, 1, 3, 4]], ['type' => 'column', 'name' => 'John', 'data' => [2, 3, 5, 7, 6]], ['type' => 'column', 'name' => 'Joe', 'data' => [4, 3, 3, 9, 0]], ['type' => 'spline', 'name' => 'Average', 'data' => [3, 2.67, 3, 6.33, 3.33], 'marker' => ['lineWidth' => 2, 'lineColor' => new JsExpression('Highcharts.getOptions().colors[3]'), 'fillColor' => 'white']], ['type' => 'pie', 'name' => 'Total consumption', 'data' => [['name' => 'Jane', 'y' => 13, 'color' => new JsExpression('Highcharts.getOptions().colors[0]')], ['name' => 'John', 'y' => 23, 'color' => new JsExpression('Highcharts.getOptions().colors[1]')], ['name' => 'Joe', 'y' => 19, 'color' => new JsExpression('Highcharts.getOptions().colors[2]')]], 'center' => [100, 80], 'size' => 100, 'showInLegend' => false, 'dataLabels' => ['enabled' => false]]]]]);
<?php use miloschuman\highcharts\Highcharts; use yii\web\JsExpression; use yii\helpers\Url; ?> <?php $this->registerJs('$.getJSON("' . URL::to(['stat/link-stat-by-date']) . '", linkstsbyday);'); echo Highcharts::widget(['callback' => 'linkstsbyday', 'scripts' => ['modules/drilldown'], 'options' => ['chart' => ['type' => 'spline'], 'title' => ['text' => Yii::t('app', 'STAT_LINK_CLICKING')], 'subtitle' => ['text' => Yii::t('app', 'STAT_LINK_CLICKING_COUNT')], 'xAxis' => ['type' => 'category'], 'yAxis' => ['min' => 0, 'title' => ['text' => Yii::t('app', 'STAT_COUNT')]], 'legend' => ['enabled' => false], 'plotOptions' => ['spline' => ['lineWidth' => '4', 'states' => ['hover' => ['lineWidth' => 5]], 'marker' => ['enabled' => true]]], 'series' => [['name' => Yii::t('app', 'STAT_COUNT'), 'data' => new JsExpression('data.dt')]], 'drilldown' => ['series' => new JsExpression('data.drill')]]]);
?> </td> </tr> <?php } ?> </table> </div> </div> <h2>Proyectos FAZNI</h2> <div class="row"> <div class="col-md-9"> <?php echo Highcharts::widget(['scripts' => ['modules/exporting', 'themes/grid-light'], 'options' => ['credits' => ['enabled' => false], 'lang' => Reportes::translations(), 'title' => ['text' => 'Beneficiarios por año vs meta'], 'chart' => ['type' => 'line'], 'xAxis' => ['allowDecimals' => false, 'categories' => $categories, 'title' => ['text' => 'Año']], 'yAxis' => ['title' => ['text' => 'Número de Usuarios']], 'series' => [['name' => 'Meta', 'data' => $metas_fazni], ['name' => 'Cobertura', 'data' => $series_fazni]]]]); ?> </div> <div class="col-md-3"> <table class="table table-bordered table-striped"> <tr> <th>Año</th> <th>Cobertura</th> <th>Meta</th> </tr> <?php for ($i = 0, $y = 2015; $y <= 2020; $y++, $i++) { ?> <tr> <td><?php echo $y;
<?php use miloschuman\highcharts\Highcharts; $this->title = 'report each month'; ?> <p> You may change the content of this page by modifying the file <code><?php echo __FILE__; ?> </code>. </p> <?php echo Highcharts::widget(['options' => ['title' => ['text' => 'รายงานจำนวนภารกิจแบ่งตามบุคคล'], 'xAxis' => ['categories' => ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.']], 'yAxis' => ['title' => ['text' => 'จำนวน']], 'series' => $data]]);
<div class="box-header with-border"> <h3 class="box-title"><i class="fa fa-sitemap"></i> <?php echo Yii::t('emp', 'Designation Wise Employee'); ?> </h3> <div class="box-tools <?php echo Yii::$app->language == 'ar' ? 'pull-left' : 'pull-right'; ?> "> <button class="btn btn-info btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button> </div> </div> <div class="box-body"> <?php if (!empty($empDesignWise)) { echo Highcharts::widget(['scripts' => ['highcharts-3d'], 'options' => ['exporting' => ['enabled' => false], 'legend' => ['align' => 'center', 'verticalAlign' => 'bottom', 'layout' => 'vertical', 'x' => 0, 'y' => 0], 'credits' => ['enabled' => false], 'chart' => ['type' => 'pie', 'options3d' => ['enabled' => true, 'alpha' => 45, 'beta' => 0]], 'title' => ['text' => '', 'margin' => 0], 'plotOptions' => ['pie' => ['allowPointSelect' => true, 'cursor' => 'pointer', 'depth' => 35, 'dataLabels' => ['enabled' => false], 'showInLegend' => true], 'series' => ['pointPadding' => 0, 'groupPadding' => 0]], 'series' => [['name' => 'Total Employee', 'data' => $empDesignWise]]]]); } else { echo '<div class="alert alert-danger">No results found.</div>'; } ?> </div> </div> </div> <!---End Course Wise Total Student Block---> </div> <!---End First Row Student Branch Wise Total & Year Wise Admission---> <!---Start Second Row Recently Added Student List Block---> <div class="row">
<?php use app\models\Reportes; use miloschuman\highcharts\Highcharts; use yii\web\JsExpression; ?> <?php if (empty($series)) { return; } echo Highcharts::widget(['scripts' => ['modules/exporting', 'themes/grid-light'], 'options' => ['credits' => ['enabled' => false], 'title' => ['text' => 'Beneficiarios por departamento'], 'lang' => Reportes::translations(), 'labels' => ['items' => [['html' => '', 'style' => ['left' => '50px', 'top' => '18px', 'color' => new JsExpression('(Highcharts.theme && Highcharts.theme.textColor) || "black"')]]]], 'series' => [['type' => 'pie', 'name' => 'Departamentos', 'coloyByPoint' => true, 'data' => $series, 'showInLegend' => true, 'dataLabels' => ['enabled' => true]]]]]);
<span class="page-header">Year Summary KPI : </span> <span id="tahunCreateTitle" class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle"><?php echo Html::encode($tahun_create); ?> </a> <?php $start = 2015; $end = date('Y'); $items = []; for ($iTahunCreate = $start; $iTahunCreate <= $end; $iTahunCreate++) { $items[] = ['label' => $iTahunCreate, 'url' => ['', 'tahun_create' => $iTahunCreate]]; } echo Dropdown::widget(['items' => $items]); ?> </span> </h3> <?php /*echo ExportMenu::widget([ 'dataProvider'=>$dataProvider, ]);*/ ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'emptyCell' => " ", 'columns' => [['header' => 'Bulan', 'attribute' => 'bulan_create'], ['header' => 'PO Total', 'attribute' => 'po_total'], ['header' => 'Tercapai %', 'attribute' => 'tercapai_persen'], ['header' => 'Tidak Tercapai %', 'attribute' => 'tdk_tercapai_persen'], ['header' => 'Belum Terkirim %', 'attribute' => 'blm_terkirim_persen'], ['header' => 'Total %', 'attribute' => 'total_persen']]]); ?> <?php echo Highcharts::widget(['scripts' => ['highcharts-more', 'modules/exporting'], 'options' => ['chart' => ['type' => 'column'], 'title' => ['text' => 'Year Summary KPI'], 'xAxis' => ['categories' => $categories, 'title' => ['text' => 'Bulan']], 'yAxis' => ['title' => ['text' => 'Value Dalam Persen']], 'series' => $series]]);
<h3 class="box-title">Trace #<?php echo Html::encode($this->title); ?> </h3> <div class="box-tools pull-right"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> <!-- /.box-tools --> </div> <!-- /.box-header --> <div id="modal-body<?php echo $model->id; ?> "> <div id="container<?php echo $model->id; ?> "> </div> <?php echo Highcharts::widget(['scripts' => ['highcharts-more', 'modules/exporting', 'themes/grid'], 'options' => ['credits' => 'false', 'gridLineWidth' => 0, 'chart' => ['renderTo' => 'container' . $model->id, 'borderWidth' => '0', 'backgroundColor' => '#FFFFFF', 'plotBackgroundColor' => '#FFFFFF', 'marginLeft' => 70], 'title' => ['text' => null], 'xAxis' => ['categories' => $arr_freq], 'series' => [['name' => 'Pout(dBm)', 'data' => $arr_power, 'color' => new JsExpression('Highcharts.getOptions().colors[1]')]]]]); ?> </div> <!-- /.box-body --> </div> </div>
<div class="col-md-6"></div> </div> <hr/> <div class="row"> <div class="container-fluid"> <div class="panel panel-default"> <div class="panel-heading clearfix"><strong><?php echo Yii::t('app', 'Track each category during the year'); ?> </strong></div> <div class="col-xs-9 col-md-4 pull-right"> </p> <?php $this->registerJs('var submit = function (val){if (val > 0) { window.location.href = "' . Url::to(['/dashboard/accomplishment']) . '?category_id=" + val; } }', View::POS_HEAD); echo Html::activeDropDownList($model, 'category_id', ArrayHelper::map(Category::find()->where(['user_id' => Yii::$app->user->identity->id])->orderBy("desc_category ASC")->all(), 'id_category', 'desc_category'), ['onchange' => 'submit(this.value);', 'prompt' => Yii::t('app', 'Select'), 'class' => 'form-control']); ?> </div> <div class="panel-body"> <?php echo Highcharts::widget(['options' => ['credits' => ['enabled' => false], 'title' => ['text' => ''], 'colors' => ['#2C3E50'], 'xAxis' => ['categories' => $m], 'yAxis' => ['title' => ['text' => ''], 'min' => 0], 'series' => [['name' => $n, 'data' => $v]]]]); ?> </div> </div> </div> </div> </div>
<h3 class="box-title kanit">สถิติผู้มารับบริการ</h3> </div> <!-- /.panel-heading --> <div class="panel-body"> <!--//<div id="morris-area-chart"></div>--> <?php $opd = Yii::$app->db2->createCommand('SELECT COUNT(DISTINCT hn) from vn_stat WHERE vstdate = DATE(NOW()) and pt_subtype = 0')->queryScalar(); $er = Yii::$app->db2->createCommand('SELECT COUNT(vn) from er_regist WHERE vstdate = DATE(NOW())')->queryScalar(); $lab = Yii::$app->db2->createCommand('SELECT COUNT(DISTINCT hn) from lab_head WHERE order_date = DATE(NOW()) and confirm_report = "Y"')->queryScalar(); $lr = Yii::$app->db2->createCommand('SELECT COUNT(an) from an_stat WHERE ward = 05 and dchdate is NULL')->queryScalar(); $xray = Yii::$app->db2->createCommand('SELECT COUNT(DISTINCT v.vn) from xray_head x LEFT OUTER JOIN vn_stat v on v.vn=x.vn WHERE v.vstdate = DATE(NOW())')->queryScalar(); $ipd1 = Yii::$app->db2->createCommand('SELECT COUNT(an) from an_stat WHERE ward = 01 and dchdate is NULL')->queryScalar(); $ipd2 = Yii::$app->db2->createCommand('SELECT COUNT(an) from an_stat WHERE ward = 02 and dchdate is NULL')->queryScalar(); $fun = Yii::$app->db2->createCommand('SELECT COUNT(vn) from dtmain WHERE vstdate = DATE(NOW())')->queryScalar(); $pcu = Yii::$app->db2->createCommand('SELECT COUNT(hn) from vn_stat WHERE vstdate = DATE(NOW()) and pt_subtype = 1')->queryScalar(); echo Highcharts::widget(['options' => ['title' => ['text' => 'Patient Visits By Day'], 'xAxis' => ['categories' => ['OPD', 'ER', 'Lab', 'ห้องคลอด', 'ห้อง X-ray', 'IPD ชาย', 'IPD หญิง', 'ทันตกรรม', 'PCU']], 'yAxis' => ['title' => ['text' => 'จำนวนผู้รับบริการ (คน)']], 'colors' => ['#6AC36A', '#FFD148', '#0563FE', '#FF2F2F'], 'gradient' => ['enabled' => true], 'credits' => ['enabled' => false], 'exporting' => ['enabled' => false], 'chart' => ['plotBackgroundColor' => '#ffffff', 'plotBorderWidth' => null, 'plotShadow' => false, 'height' => 400, 'type' => 'column'], 'series' => [['name' => 'จำนวนผู้รับบริการ', 'data' => [intval($opd), intval($er), intval($lab), intval($lr), intval($xray), intval($ipd1), intval($ipd2), intval($fun), intval($pcu)]]]]]); ?> ** ข้อมูลจากฐานข้อมูล HOSxP ณ วันที่ <?php Yii::$app->formatter->locale = 'th_TH'; $time = time(); echo Yii::$app->formatter->asDateTime($time, 'medium'); ?> น. จากเครื่องเซิร์ฟเวอร์สำรอง [10.20.0.100] </div> <!-- /.panel-body --> </div> <!-- /.panel --> </div> <!-- /.col-lg-8 --> <div class="col-lg-4">
<!--Start Paid/Due amount graph block---> <div class="row"> <div class="col-md-12"> <div class="box box-warning"> <div class="box-header with-border"> <h3 class="box-title"><i class="fa fa-bar-chart"></i> Individual Category Wise Fees Collection </h3> <div class="box-tools pull-right"> <button class="btn btn-warning btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button> </div> </div> <div class="box-body"> <?php if (!empty($fcCategory) && !empty($fccWisePaidUnPaid)) { echo Highcharts::widget(['options' => ['chart' => ['type' => 'column'], 'exporting' => ['enabled' => false], 'credits' => ['enabled' => false], 'title' => ['text' => ''], 'subtitle' => ['text' => 'Current Active Fees Collection Category Wise', 'margin' => 0], 'xAxis' => ['categories' => $fcCategory], 'yAxis' => ['title' => ['text' => 'Fees Amount']], 'plotOptions' => ['column' => ['pointPadding' => 0.2, 'borderWidth' => 0]], 'series' => $fccWisePaidUnPaid]]); } else { echo '<div class="alert alert-danger">No results found.</div>'; } ?> </div> </div> </div> </div> <!--End Paid/Due amount graph block---> <!---Start Second Row Recently Added Student List Block---> <div class="row"> <div class="col-md-12"> <div class="box box-primary"> <div class="box-header with-border">
<td>Cancelado</td> <td><?php echo $cancelado[0]; ?> </td> </tr> <tr style="color:#095B11"> <td>Concluído</td> <td><?php echo $concluido[0]; ?> </td> </tr> </table> </div> <div class="col-md-6"> <?php //var_dump($concluido); echo Highcharts::widget(['options' => ['plotOptions ' => 'pie', 'credits' => ['enabled' => false], 'chart' => ['height' => 300], 'title' => ['text' => ''], 'colors' => ['#282828', '#1045A0', '#A81212', '#DB5700', '#777777', '#095B11'], 'tooltip' => ['pointFormat' => 'Percentual: <b>{point.percentage:.1f}%</b>'], 'plotOptions' => ['pie' => ['allowPointSelect' => true, 'cursor' => 'pointer', 'dataLabels' => ['enabled' => true], 'showInLegend' => ['enabled' => true]]], 'series' => [['type' => 'pie', 'name' => 'Valor', 'data' => [['Aguardando', $aguardando[0]], ['Em andamento', $andamento[0]], ['Pendência', $pendencia[0]], ['Alterado', $alterado[0]], ['Cancelado', $cancelado[0]], ['Concluído', $concluido[0]]]]]]]); ?> </div> </div><?php } ?> </div> </div> </div> </div>
<?php $form = ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'form-horizontal'], 'method' => 'get']); ?> <!-- <?php echo Html::input('char', 'year'); ?> --> <?php echo $form->field($formModel, 'year'); ?> <?php echo Html::submitButton('Search'); ?> <!-- input --> <?php ActiveForm::end(); ?> <?php echo \yii\grid\GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'kategori', 'januari', 'februari', 'maret', 'april', 'mei', 'juni', 'juli', 'agustus', 'sepetember', 'oktober', 'november', 'desember']]); ?> <?php // var_dump($categories); echo Highcharts::widget(['scripts' => ['highcharts-more', 'modules/exporting'], 'options' => ['title' => ['text' => 'Record Bulan', 'x' => -20], 'subtitle' => ['text' => 'On Line Chart', 'x' => -20], 'xAxis' => ['categories' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']], 'yAxis' => ['title' => ['text' => 'Value'], 'plotLines' => [['value' => 0, 'width' => 1, 'color' => '#808080']]], 'series' => $series]]);
$js_categories = implode("','", $categories); for ($i = 0; $i < sizeof($data); $i++) { if ($target[$i] == null) { $datas[] = 0; } else { $datas[] = number_format($result[$i] / $target[$i] * 100, 2, '.', ''); } } $js_datas = implode(',', $datas); $this->registerJs("\r\n var categories = ['{$js_categories}'];\r\n \$('#graph').highcharts({\r\n chart: {\r\n type: 'column',\r\n height: 600\r\n },\r\n credits: {\r\n enabled: false\r\n },\r\n title: {\r\n text: 'เปอร์เซ็นต์ ANC 12 week'\r\n },\r\n subtitle: {\r\n text: 'ข้อมูลจาก : 43 แฟ้ม'\r\n },\r\n xAxis: {\r\n categories: categories,\r\n labels: {\r\n rotation : -45\r\n },\r\n reversed: false,\r\n },\r\n yAxis: {\r\n min: 0,\r\n max: 100,\r\n title: {\r\n text: 'เปอร์เซ็นต์'\r\n }\r\n },\r\n series: [{\r\n name: 'percent',\r\n data: [{$js_datas}]\r\n }]\r\n });\r\n "); ?> <div class="row"> <div style="display: none"> <?php echo Highcharts::widget(['scripts' => ['highcharts-more', 'themes/grid']]); ?> </div> <div id="graph"></div> </div> <br> <div class="pull-left"> <h4> <span style="color: white;padding: 5px;">ANC 12 สัปดาห์ ปีงบประมาณ 2559</span> </h4> <a class="btn btn-success" href="<?php echo Url::to(['indexanc12week']); ?> ">
<div class='col-sm-5'> <?php $result = ArrayHelper::map(app\models\CmbisKpi::find()->where(['between', 'kpi_id', '1', '15'])->all(), 'kpi_id', 'kpi_name'); echo Html::dropDownList('kpi', $kpi, $result, ['class' => 'form-control', 'prompt' => 'เลือกตัวชี้วัด']); $target = Yii::$app->db->createCommand(' SELECT kpi_percent_target FROM cmbis_kpi WHERE kpi_id=:kpi_id ', [':kpi_id' => $kpi])->queryScalar(); if ($target == null) { $target = 60; } ?> </div> <div class='col-sm-2'> <button class='btn btn-danger'>ประมวลผล</button> </div> </div> </form> </div> <div style="display: none"> <?php echo Highcharts::widget(['scripts' => ['highcharts-more', 'modules/drilldown']]); ?> </div> <div id="chart1" style="min-width: 220px; height: 420px; margin: 5 auto; text-align: center;"></div> <?php $this->registerJs("\$(function () {\r\n \$('#chart1').highcharts({\r\n chart: {\r\n type: 'column'\r\n },\r\n title: {\r\n text: 'แผนภูมิแท่งเปรียบเทียบตัวชี้วัด'\r\n },\r\n xAxis: {\r\n type: 'category',\r\n labels: {\r\n rotation: -45,\r\n style: {\r\n 'fontSize': '10px',\r\n 'fontFamily': 'Verdana, sans-serif'\r\n }\r\n }\r\n },\r\n yAxis: {\r\n title: {\r\n text: '<b>ร้อยละ</b>',\r\n },\r\n min: 0,\r\n max: 100,\r\n plotLines: [{\r\n value: {$target},\r\n dashStyle: 'dash',\r\n color: 'red',\r\n width: 2,\r\n label: {\r\n text: 'เป้าหมาย: {$target}%',\r\n align: 'center',\r\n style: {\r\n color: 'gray'\r\n }\r\n }\r\n }]\r\n },\r\n legend: {\r\n enabled: true\r\n },\r\n plotOptions: {\r\n series: {\r\n borderWidth: 0,\r\n dataLabels: {\r\n enabled: true\r\n }\r\n }\r\n },\r\n series: [\r\n {\r\n name: 'อำเภอ',\r\n colorByPoint: true,\r\n data:{$main}\r\n \r\n }\r\n ],\r\n drilldown: {\r\n series:[\r\n \t{'id':'5001','name':'อำเภอเมือง','data':{$sub_a5001}},\r\n \t{'id':'5002','name':'อำเภอจอมทอง','data':{$sub_a5002}},\r\n \t{'id':'5003','name':'อำเภอแม่แจ่ม','data':{$sub_a5003}},\r\n \t{'id':'5004','name':'อำเภอเชียงดาว','data':{$sub_a5004}},\r\n \t{'id':'5005','name':'อำเภอดอยสะเก็ด','data':{$sub_a5005}},\r\n \t{'id':'5006','name':'อำเภอแม่แตง','data':{$sub_a5006}},\r\n \t{'id':'5007','name':'อำเภอแม่ริม','data':{$sub_a5007}},\r\n \t{'id':'5008','name':'อำเภอสะเมิง','data':{$sub_a5008}},\r\n \t{'id':'5009','name':'อำเภอฝาง','data':{$sub_a5009}},\r\n \t{'id':'5010','name':'อำเภอแม่อาย','data':{$sub_a5010}},\r\n \t{'id':'5011','name':'อำเภอพร้าว','data':{$sub_a5011}},\r\n \t{'id':'5012','name':'อำเภอสันป่าตอง','data':{$sub_a5012}},\r\n \t{'id':'5013','name':'อำเภอสันกำแพง','data':{$sub_a5013}},\r\n \t{'id':'5014','name':'อำเภอสันทราย','data':{$sub_a5014}},\r\n \t{'id':'5015','name':'อำเภอหางดง','data':{$sub_a5015}},\r\n \t{'id':'5016','name':'อำเภอฮอด','data':{$sub_a5016}},\r\n \t{'id':'5017','name':'อำเภอดอยเต่า','data':{$sub_a5017}},\r\n \t{'id':'5018','name':'อำเภออมก๋อย','data':{$sub_a5018}},\r\n \t{'id':'5019','name':'อำเภอสารภี','data':{$sub_a5019}},\r\n \t{'id':'5020','name':'อำเภอเวียงแหง','data':{$sub_a5020}},\r\n \t{'id':'5021','name':'อำเภอไชยปราการ','data':{$sub_a5021}},\r\n \t{'id':'5022','name':'อำเภอแม่วาง','data':{$sub_a5022}},\r\n \t{'id':'5023','name':'อำเภอแม่ออน','data':{$sub_a5023}},\r\n \t{'id':'5024','name':'อำเภอดอยหล่อ','data':{$sub_a5024}},\r\n \t{'id':'5025','name':'อำเภอกัลยาณิวัฒนา','data':{$sub_a5025}},\r\n ]\r\n \r\n },\r\n credits : {enabled : false}\r\n });\r\n});", yii\web\View::POS_END);
<?php use miloschuman\highcharts\Highcharts; $this->registerJsFile('./js/chart_dial.js'); ?> <div style='display: none'> <?php echo Highcharts::widget(['scripts' => ['highcharts-more']]); ?> </div> <div class="row"> <div class="col-sm-4"> <div > <?php $sql = "select 90 as base"; $base = Yii::$app->db->createCommand($sql)->queryScalar(); $result = 75; $this->registerJs("\n var obj_div=\$('#ch1');\n gen_dial(obj_div,{$base},{$result});\n "); ?> <h4>ประชาชนอายุ 35 ปีขึ้นไปได้รับการคัดกรอง<br>ความดันโลหิต </h4> <div id="ch1"></div> </div> </div> <div id="chart2" class="col-sm-4"> พื้นที่แสดง chart2 </div> <?php $sql = "select prov,result from work"; $raw = $base = Yii::$app->db->createCommand($sql)->queryAll();
use kartik\widgets\ActiveForm; use kartik\widgets\DepDrop; use yii\widgets\pjax; use miloschuman\highcharts\Highcharts; $this->title = 'My Yii Application'; ?> <div class="site-index"> <div class="container-fluid"> <div class="row"> <div class="col-sm-8" style="background-color:lavenderblush;"><img src="<?php echo Yii::$app->urlManager->baseUrl . '/images/mobil.jpg'; ?> " class="img-thumbnail" alt="" width="100%"/> <?php echo Highcharts::widget(['options' => ['title' => ['text' => 'Fruit Consumption'], 'xAxis' => ['categories' => ['Apples', 'Bananas', 'Oranges']], 'yAxis' => ['title' => ['text' => 'Fruit eaten']], 'series' => [['name' => 'Jane', 'data' => [1, 0, 4]], ['name' => 'John', 'data' => [5, 7, 3]]]]]); ?> <br/><br/> <div class="row"> <div class="col-md-7"> <?php use scotthuangzl\googlechart\GoogleChart; echo GoogleChart::widget(array('visualization' => 'Map', 'packages' => 'map', 'loadVersion' => 1, 'data' => array(['Country', 'Population'], ['China', 'China: 1,363,800,000'], ['India', 'India: 1,242,620,000'], ['US', 'US: 317,842,000'], ['Indonesia', 'Indonesia: 247,424,598'], ['Brazil', 'Brazil: 201,032,714'], ['Pakistan', 'Pakistan: 186,134,000'], ['Nigeria', 'Nigeria: 173,615,000'], ['Bangladesh', 'Bangladesh: 152,518,015'], ['Russia', 'Russia: 146,019,512'], ['Japan', 'Japan: 127,120,000']), 'options' => array('title' => 'My Daily Activity', 'showTip' => true))); ?> </div> <div class="col-md-5">
<div class="page-header"><?php echo Html::encode($this->title); ?> </div> </div> <br/> <div class="admin-default-index"> <div class="col-md-12"> <div class="row"> <div class="col-md-8"> <div class="row" style="padding-right: 7px;"> <div class="dashboard_box"> <h2>Statistic</h2> <?php echo Highcharts::widget(['options' => ['chart' => ['type' => 'column'], 'title' => ['text' => 'สถิติประจำปี ' . ($model->year + 543)], 'credits' => ['enabled' => false], 'exporting' => ['enabled' => false], 'xAxis' => ['categories' => ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.']], 'yAxis' => ['title' => ['text' => 'จำนวนผู้เยื่ยมชม (ครั้ง)']], 'tooltip' => ['valueSuffix' => ' ครั้ง'], 'legend' => ['layout' => 'vertical', 'align' => 'right', 'verticalAlign' => 'top', 'x' => -10, 'y' => 100, 'borderWidth' => 0], 'plotOptions' => ['column' => ['stacking' => 'normal', 'dataLabels' => ['enabled' => true, 'color' => Highcharts . theme && Highcharts . theme . dataLabelsColor || 'white', 'style' => ['textShadow' => '0 0 3px black']]], 'series' => ['cursor' => 'pointer']], 'series' => $model->searchYearBar()]]); ?> </div> </div> </div> <div class="col-md-4"> <div class="row"> <div class="col-md-12"> <div class="dashboard_box"> <h2>Country</h2> <?php $result = app\models\Sitecounter::find()->select(['country', 'cnt' => 'count(*)'])->where(['module' => 'site'])->groupBy('country')->orderBy('cnt DESC')->limit(10)->all(); echo '<table class="table table-striped"><tr><td width="70%">ประเทศ</td><td width="30%" style="text-align: right;">จำนวน</td></tr>'; foreach ($result as $r) { echo "<tr><td>"; echo $r->country;